here.
Use this. I made it yesterday.
This will keep track of peoples IP's and tell you how many people have visited your site.
(also, in the database, you can change the IP feild to UNIQUE so they can only submit once.)
<table border="1" bordercolor="#000000" width="20" height="15" cellpadding="0" cellspacing="0" background="stat.gif">
<tr>
<td bordercolor="#FFFFFF"><center>
<?php
$ipaddy = getenv("REMOTE_ADDR");
?>
<?php
$connection = mysql_pconnect("localhost", "root", "XXXXXXX")
or die ("Couldn't connect to server.");
$db = mysql_select_db("info", $connection)
or die ("Couldn't select database.");
$sql = "INSERT INTO hits (theip)
VALUES ('$ipaddy')";
$sql_result = mysql_query($sql,$connection);
?>
<?php
//Script made by Jared Whittington
$db = mysql_connect("localhost", "root", "XXXXXX");
mysql_select_db("info",$db);
$sql="SELECT count(theip) FROM hits";
$result=mysql_query($sql,$db);
while ($row = mysql_fetch_array($result))
{
$id = $row["0"];
echo "<font face=\"verdana\" size=\"1\">b>$id</b></font>";}
?>
</center></td>
</tr>
</table>
</td>
</tr>
</table>