hi @ all!
I don't want to see my accesses on my ip-logger file. so I tried to make an if-condition (if the ip isn't xx.xx.xx.xx then write). but this doesn't really work! have anyone a solution for my problem?
thx a lot
here my php-script:
<?php
$ip = $REMOTE_ADDR;
$host = gethostbyaddr($ip);
$referer = $HTTP_REFERER;
$browser = $HTTP_USER_AGENT;
$datenbank = "access.dat";
$datei = fopen($datenbank ,"a");
$zeit = strftime("%c");
setlocale ("LC_TIME", "de_DE");
if ($ip != 111.222.333.444 ) {
fwrite($datei, "$zeit\t$ip\t$browser\t\t$host\t\t$referer\n");
}
$count = "count.dat";
$fd = fopen ($count, "rb");
$contents = fread ($fd, filesize ($count));
fclose ($fd);
$x = $contents + 1;
if ($ip != 111.222.333.444 ) {
$datei = fopen($count ,"w");
fwrite($datei, "$x");
}
?>