How can I tell the url a visitor is coming from?
Moderator: General Moderators
-
sirkoolaid
- Forum Newbie
- Posts: 1
- Joined: Fri Aug 29, 2008 4:56 pm
How can I tell the url a visitor is coming from?
How can I tell the url a visitor is coming from with PHP?
Re: How can I tell the url a visitor is coming from?
Code: Select all
<?
echo $_SERVER['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.
$_SERVER PHP manual