Hello

i want to make a php file for a download page so the same IP address cannot download the file twice

I want to make a php file that can check the IP of the visitor and if the IP already exists in a .txt file then it doesnt store it and if the IP doesnt exist then it stores it in the .txt file and then redirects the visitor to the download page

and i want the maximum IPs in the .txt file to be 4000 IPs so when it reaches 4000 IP's and a new visitor come the first IP gets deleted and the new IP is stored

i would appreciate if someone helps me

Cheers
Adel