I got a script to counter the users on my website, and i adds stats into my MySQL database.
I've set it so it doesn't add stats for my IP, but that doesn't seem to work.
PHP Code:
<?php
// database configuration
include('/websites/LinuxPackage02/gk/s_/uk/gks.uk.com/public_html/1/includes/db.php');
// Connect to database
dbConnect(); // Excludes self IP
if ($REMOTE_ADDR != 'my.ip.add.ress'){
// Add to database
date_default_timezone_set('GMT'); $datetime = date('d M Y h:i:s a'); $querystat = "INSERT INTO countstats (Name, IP, DateTime) VALUES('About the Author', '$REMOTE_ADDR', '$datetime')"; $resultstat = mysql_query($querystat); if (!$result){ echo mysql_error() ; } }
?>
HTML Content for site here
of course 'my.ip.add.ress' actually contains my ip address, but I don't want to give that information out on here.
Can anyone see what this is logging my IP when it shouldn't.
|