View file ec_v0.1/count.php
<? $ip = $REMOTE_ADDR."\n"; $forw = getenv(HTTP_X_FORWARDED_FOR); if (($forw != "") && ($forw != $REMOTE_ADDR)) $ip = $ip.'/'.$forw."\n"; $hit =fopen('hit.dat', "a"); $query = $ip; fwrite($hit, $ip); fclose($hit); $file = file('host.dat'); $count = count($file); for ($i=0; $i<=$count;$i++) { if (strstr($file[$i], $ip)) { fclose($hit); exit; } else { $host =fopen('host.dat', "a"); $query = $ip; fwrite($host, $ip); fclose($host); exit; } } ?>