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
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]
Link to comment
Share on other sites

[!--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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.