This code below is all the code that makes this page
http://www.citrusmedia.biz/report_stats.php
<?
function getcountry($ip) {
$host = gethostbyaddr($ip);
$hostdot = ".";
$result = strrchr($host, $hostdot);
return $result;
}
$link = mysql_connect("localhost", "", "") or die("Unable to connect to Database!");
mysql_select_db("***") or die("Unable to select base");
$sql = "SELECT * FROM stats Order By Date DESC";
$query = mysql_query($sql) or die ("Error in query");
while ($row=mysql_fetch_array($query)) {
$sql2 = "SELECT Time FROM stats_details Where StatID = '$row[Id]'";
$query2 = mysql_query($sql2) or die ("Error in query");
$totalhits = mysql_num_rows($query2);
echo "<a href='report_stats_details.php?stat=".$row['Id']."'>".date("l dS of F Y h:i:s A",$row['Date'])."</a> - Total Hits ".$totalhits." - IP ".$row['IP']." - ".@gethostbyaddr($row['IP'])." - Referer ".$row['Referer']."<br>";
}
?>
[/COLOR]
As you can see there is no DB insert code. But sometimes I can see my hit count going up be refreshing this page ( and others), it is somehow executing the index page of the site and thus inserting records into the database
Very Weird I can' figure it out