Click to See Complete Forum and Search --> : [RESOLVED] visitor counter
ninjanutz
Jul 20th, 2005, 11:39 PM
how can i make a visitor counter that excludes me from the counting and only counts once if the same person goes bak and forth between pages for as long as they dont close the site?
|2eM!x
Jul 21st, 2005, 12:30 AM
If your ip is always the same, then you can add it to an excludes list.
For the visitorcounter, have it only add on the first page and on the other pages just grab its value :wave:
ninjanutz
Jul 21st, 2005, 12:37 AM
ok how do i check if my ip is the same? and i woudl have it grab values of the first for the others but i want each individual page to have its own individual counter so i can see how far into the site people go.
BIOSTALL
Jul 24th, 2005, 11:03 AM
Look into sessions my good man :thumb:
BIOSTALL
nkad
Jul 25th, 2005, 02:10 AM
ninja, first, take a look at this http://us2.php.net/variables.predefined
if you use the $_SERVER superglobal, you can get the remote client IP by doing
<?
echo $_SERVER['REMOTE_ADDR'];
?>
that will get your IP also if you happen to view the page. what i think you should do is store a cookie on your computer and have your script check for the cookie to see if it exists. if it does, have your code not count you
ninjanutz
Jul 25th, 2005, 09:41 PM
cool i wanna figure out the code on my own but how would i make a cookie?
manavo11
Jul 25th, 2005, 10:07 PM
http://www.php.net/setcookie
ninjanutz
Jul 26th, 2005, 01:26 AM
thanx manavo
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.