Zoofu Posted January 3, 2010 Share Posted January 3, 2010 $CIP = $_SERVER['REMOTE_ADDR']; $selv300=mysql_query("SELECT * FROM `online` WHERE `ip`='$CIP'") OR die(mysql_error()); $rowv300=mysql_fetch_assoc($selv300); if($rowv300){ }else{ $sql400 = "INSERT INTO `online` (`ip`) VALUES ('".$CIP."')"; $res400 = mysql_query($sql400) or die(mysql_error()); } It only works when they're logged in. Otherwise it won't recognise them as an IP. Link to comment https://forums.phpfreaks.com/topic/187017-tracking-ips-is-becoming-a-bit-tedious-and-wishing-not-to-work/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.