GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Referring URL's protection - how to in PHP? (https://gfy.com/showthread.php?t=144154)

SexySarah 06-17-2003 09:14 AM

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 06-17-2003 09:26 AM

Anyone? :(

foe 06-17-2003 09:34 AM

what error does it give you

SexySarah 06-17-2003 09:46 AM

It actually works fine.

But I've been playing around and it just isn't secure against spoofers.

I used zspoof and I got around it very easily.

I was just wondered if there's anyway to make it a little more secure against spoofing?


(sorry about using the word spoof quite so many times).

neighborhood_bob 06-17-2003 09:50 AM

A fair security measure is to insist that your members have
cookies enabled to view the site. Use a combo of .htaccess and
cookies to verify members on login. As far as I know, there isn't
really a way to stop spoofers when your only validation is through
reading the Referrer. Not an expert, just my experiences.

SexySarah 06-17-2003 09:51 AM

Quote:

Originally posted by neighborhood_bob
A fair secirotu measure is to insist that your members have
cookies enabled to view the site. Use a combo of .htaccess and
cookies to verify members on login. As far as I know, there isn't
really a way to stop spoofers when your only validation is through
reading the Referrer. Not an expert, just my experiences.

Interesting.

I'll search phpbuilder.com to see how I can integrate cookies as a security measure too.


All times are GMT -7. The time now is 10:56 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123