<?php session_start(); $pid = $_GET['pid']; $uid = substr(session_id(),0,10); if ($uid == "") $uid = $_SERVER['REMOTE_ADDR']; $fFile = "statistic_data.txt"; if ($pid != '') { $line = $pid."#~#".$uid."\r\n"; $facts = fopen($fFile, "a"); fwrite($facts,$line); fclose($facts); } $facts = file($fFile); if (sizeof($facts) > 1276) { $facts = array_unique($facts); $facts = array_reverse($facts); $facts = array_slice($facts,0,766,true); $facts = array_reverse($facts); $towrite = implode("", $facts); $temp = fopen($fFile,"w"); file_put_contents($fFile,$towrite); fclose($temp); } ?> <html> <head> </head> <body> &nbsp; </body> </html>