url tracking

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

url tracking

Post by itsmani1 »

Hi

I want to track users on page so that i can know from where users are coming to my page. Is there any way in php so that i can find out that this users came from which url to my page?

Regards
dizyn
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: url tracking

Post by onion2k »

Use $_SERVER['HTTP_REFERER']

Note however that it is optional if the browser sends that information. You won't get it from everyone. Also note that it's data from the browser so the user can change it to whatever they like if they want to, so don't use it for security.
Post Reply