Right i have this code to count the total unique hits on my site. What i am doing is checking weather the IP adress of the user and if that IP is the same as it is what is in the database then it wont log it, otherwise it logged the ip.
Here is what i got so far
Its just blocking all of the IP adress though! AHH, I did it before but i just cannot remember how to though!
Good rep if someone helps me please!!
Here is what i got so far
Code:
$ip = $_SERVER['REMOTE_ADDR'];
$uniquetotal = mysql_query("SELECT * FROM uniquetotal") or die(mysql_error());
if($ip = mysql_fetch_array($uniquetotal)){
}
else{
$ip = $_SERVER['REMOTE_ADDR'];
mysql_query("INSERT INTO uniquetotal(ip) VALUES('$ip')") or die(mysql_error());
}
Its just blocking all of the IP adress though! AHH, I did it before but i just cannot remember how to though!
Good rep if someone helps me please!!
Last edited: