Hey,
So here is the deal. I'm trying to make it so a certain page on my site can only be accessed if the user is coming from a specific 'external' site. I did some research online and this is what I have come up with:
<?
if (strstr($_SERVER['HTTP_REFERER'],"google.com")) {
header ("Location: thanks.html");
} else {
header ("Location: index.html");
}
?>
The above code lives in the file 'test.php'. Here is the issue: When attempting to go to the URL 'test.php' directly from google.com I keep getting directed to 'index.html' rather than 'thanks.html' even though it's the correct 'referring' site.
Any suggestions would be greatly appreciated.
Thanks!