View Single Post
Old 06-17-2003, 09:14 AM  
SexySarah
So Fucking Banned
 
Join Date: May 2003
Posts: 1,076
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 ]
SexySarah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote