This entry was posted
on Monday, January 29th, 2007 at 4:02 pm and is filed under Script snippet.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Yea thats one of the things that changed from PHP3 to PHP4. I had forgotten all about it. I just used this in my video app that was assigning an incorrect URL to videos. This variable made the correction. Thanks.
if ($_SERVER['HTTP_REFERER']=$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])
{echo ‘Form came from me’;}
else
{echo ‘Form came from spam bot at’.$_SERVER['REMOTE_ADDR'].’.';}
if ($_SERVER['HTTP_REFERER']=$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])
{echo ‘Form came from me’;}
else
{echo ‘Form came from spam bot at’.$_SERVER['REMOTE_ADDR'].’.';}
February 6th, 2007 at 3:40 pm
You should be using $_SERVER (for PHP4 and up). Other than that, I know exactly what you mean
February 10th, 2007 at 9:34 pm
Updated with $_SERVER
November 24th, 2007 at 1:30 pm
Yea thats one of the things that changed from PHP3 to PHP4. I had forgotten all about it. I just used this in my video app that was assigning an incorrect URL to videos. This variable made the correction. Thanks.
February 9th, 2008 at 2:24 pm
This is fun, and very useful:
if ($_SERVER['HTTP_REFERER']=$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])
{echo ‘Form came from me’;}
else
{echo ‘Form came from spam bot at’.$_SERVER['REMOTE_ADDR'].’.';}
March 7th, 2008 at 2:01 am
What is the use of the ff codes?
if ($_SERVER['HTTP_REFERER']=$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"])
{echo ‘Form came from me’;}
else
{echo ‘Form came from spam bot at’.$_SERVER['REMOTE_ADDR'].’.';}