keep IP from visitors and place them on a file.
<?php
$file = fopen("ip.txt","a");
$ip=$_SERVER['REMOTE_ADDR'];
echo fwrite($file,$ip);
fclose($file);
?>
this store in a file as name ip.txt
("ip.txt","a");
the second parameter can use "w" if you want only write mode
"a" stands for append mode .
No comments:
Post a Comment