Okay i made this script that should add ip's to ip_log.txt
and the same ip can't be there twice..
And 1 ip on each line
Heres code:
""""""""""""""""""""""
<?
$ip = $_SERVER['REMOTE_ADDR'];
$fp = fopen("ip_log.txt", "rw+");
if(strpos(fread($fp , filesize($filename)),$ip) === false){
fwrite($fp,$ip."\n");
}
fclose($fp);
?>
"""""""""""""""""""""""
i get this error:
Warning: fread() [function.fread]: Length parameter must be greater than 0 in index.php on line 4
Please someone inhere that can figure it out ?
and the same ip can't be there twice..
And 1 ip on each line
Heres code:
""""""""""""""""""""""
<?
$ip = $_SERVER['REMOTE_ADDR'];
$fp = fopen("ip_log.txt", "rw+");
if(strpos(fread($fp , filesize($filename)),$ip) === false){
fwrite($fp,$ip."\n");
}
fclose($fp);
?>
"""""""""""""""""""""""
i get this error:
Warning: fread() [function.fread]: Length parameter must be greater than 0 in index.php on line 4
Please someone inhere that can figure it out ?