Reputation: 4059
People come to my website from variety of other websites and I would like to know these referral urls? How can I do it in PHP?
Upvotes: 0
Views: 537
Reputation: 5357
Use the system variable:
$_SERVER['HTTP_REFERER']
Check this answer for more details.
Upvotes: 0
Reputation: 12323
$ref = getenv("HTTP_REFERER");
or
$ref = $_SERVER['HTTP_REFERER'];
Upvotes: 0