Jump to content

HTTP_REFERER Issues *SOLVED*


kickassamd

Recommended Posts

I cant seem to get HTTP_REFERER to work.... Its always returning nothing.....even though im coming from somewhere [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /]

Windows hosting aswell if that makes a diffrence. Any idears?
Link to comment
https://forums.phpfreaks.com/topic/9629-http_referer-issues-solved/
Share on other sites

This gets sent by the browser (if even a browser is used) and so it's not 100% reliable. Some browsers might not send it but most do. It also can be faked/altered by users/hackers.

Sometimes when you're testing locally instead of the Internet, it doesn't get passed/set.

But make sure you're using $_SERVER['HTTP_REFERER'] and not $HTTP_REFERER. See:

[a href=\"http://us2.php.net/manual/en/reserved.variables.php#reserved.variables.server\" target=\"_blank\"]http://us2.php.net/manual/en/reserved.vari...ariables.server[/a]
[!--quoteo(post=373613:date=May 13 2006, 07:20 PM:name=toplay)--][div class=\'quotetop\']QUOTE(toplay @ May 13 2006, 07:20 PM) [snapback]373613[/snapback][/div][div class=\'quotemain\'][!--quotec--]
This gets sent by the browser (if even a browser is used) and so it's not 100% reliable. Some browsers might not send it but most do. It also can be faked/altered by smart users/hackers.

Sometimes when you're testing locally instead of the Internet, it doesn't get passed/set.

But make sure you're using $_SERVER['HTTP_REFERER'] and not $HTTP_REFERER. See:

[a href=\"http://us2.php.net/manual/en/reserved.variables.php#reserved.variables.server\" target=\"_blank\"]http://us2.php.net/manual/en/reserved.vari...ariables.server[/a]
[/quote]

I am using the $_SERVER['HTTP_REFERER'] variable, And used IE \ Maxthon \ FF, none seem to work.....

Im just trying to create a simple hotlink protection script. Sense Im on windows i cant use .htaccess.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.