Sorry, probably wrong list but... I need a little help with PHP.  I'm
trying to make a PHP-based counter for my web page but want it based on
unique visits (not refreshes, etc.)

I'm storing the IP address in the MySQL table and want to compare the
current IP to the last IP address stored in the database, so this is what
I'm currently using (but it doesn't work):

$curip = getenv('REMOTE_ADDR');
if ($ip != $curip) {
  $count = $count + 1;
}

But it increases on every refresh.  I don't see a different comparison
operator for strings (like in perl), otherwise I'd use "ne" instead of
"!=".  Does anyone know why this isn't working?

Thanks in advance.

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
Freezer Burn BBS:  telnet://bbs.freezer-burn.org . ICQ: 54924721
Webmaster for the Linux Portal Site Freezer Burn:  http://www.freezer-burn.org

Reply via email to