Referring URL's protection - how to in PHP?
The following code works pretty well, but spoofing easily gets past it. Is there a stronger way to protect certain pages short of using passwords? Free, preferably.
Thanks!!!
$Referer = getenv("HTTP_REFERER");
if (strchr($Referer, "URL"))
{
echo "text";
}
elseif (strchr($Referer, "URL2"))
{
echo "text";
}
else
{
echo "[script];window.location='http://www.redirectURL.com';[/script]";
}
Obviously < changed to [ and > changed to ]
|