Jump to content


Photo

HTTP_REFERER Issues *SOLVED*


  • Please log in to reply
4 replies to this topic

#1 kickassamd

kickassamd
  • Members
  • PipPipPip
  • Advanced Member
  • 102 posts
  • LocationDallas Tx

Posted 13 May 2006 - 11:50 PM

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?

#2 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 14 May 2006 - 12:20 AM

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]

#3 kickassamd

kickassamd
  • Members
  • PipPipPip
  • Advanced Member
  • 102 posts
  • LocationDallas Tx

Posted 14 May 2006 - 12:31 AM

[!--quoteo(post=373613:date=May 13 2006, 07:20 PM:name=toplay)--][div class=\'quotetop\']QUOTE(toplay @ May 13 2006, 07:20 PM) View Post[/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.

#4 kickassamd

kickassamd
  • Members
  • PipPipPip
  • Advanced Member
  • 102 posts
  • LocationDallas Tx

Posted 14 May 2006 - 01:47 AM

Got it working :)

#5 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 14 May 2006 - 04:17 PM

[a href=\"http://refspoof.mozdev.org/\" target=\"_blank\"]Here's[/a] a mozilla plugin too spoof your referrer.

I haven't tried it, but I reckon I don't have to be a smart hacker to use it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users