Can PHP know where visitor link from ?

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
naruponk
Forum Newbie
Posts: 1
Joined: Tue Feb 24, 2009 7:20 am

Can PHP know where visitor link from ?

Post by naruponk »

Hi,

Can PHP know where visitor link from ?
I would like to know how can can visitor came to my site

thanks in advance :D
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Can PHP know where visitor link from ?

Post by VladSun »

$_SERVER['HTTP_REFERER'] :
'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply