Question

Ok, something real fishy is going on over on Facebook (what else is new) and I've been researching and testing for more than an hour, with no success.

By using the PHP codes below and I post it on my Facebook wall then click on it, once the page comes up, it does not show the Facebook referral address.

However, if I click on the link where it says "Test link" from my own site, it shows my server and file URL as being the referer.

Anyone else faced with the same problem?

I'm completely baffled.

Here's my code:

<?php

echo $_SERVER['HTTP_REFERER'];

echo "<br>";

echo "<a href=\"test.php\">Test link</a>";

?>
Was it helpful?

Solution

HTTP_REFERER is not a mandatory HTTP header. Many sites spoof/remove it. Apparently so does Facebook.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top