Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,, I am trying to write user ip to a txt file to minimize double voting on a simple php poll i have been trying to code myself as i want to learn. Can anyone maybe point me in the direction of achieving this? I need to be able to write the ip to txt then call the txt to check if already voted, Thank you for any of your time, Greatly appreciated, Creig
Posted

1 solution

Better to use database. Here your needed code.
$ip=$_SERVER[REMOTE_ADDR];
$handle=fopen("ip.txt", "a+");
fwrite($handle,$ip);
?>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900