include "admin/include/conn.inc.php"; $filename=$_REQUEST['filename']; $urlid=$_REQUEST['urlid']; $currentdate=date_default_timezone_set(); /* $currentdate=date('Y-m-d'); */ $ipaddress=rand (1,254).".".rand (1,254).".".rand (1,254).".".rand (1,254); if($filename=='') { print ""; } else { $like=mysql_query("INSERT INTO `hitcounter` ( add_id, `counter` , hitdate, ip_address ) VALUES ( '".$urlid."', '1', '$currentdate' , '".$ipaddress."')"); if($like!='') { $sqlquery=mysql_query("select * from advertise where id='$urlid'"); $linelist=mysql_fetch_array($sqlquery); $hitcounter=$linelist['hitcounter']; $newhit=$hitcounter+1; $sqlupdate=mysql_query("update advertise set hitcounter='$newhit' where id='$urlid'"); print ""; } else { print ""; } } ?>