NYCPHP Meetup

NYPHP.org

[nycphp-talk] IIS: $_SERVER & referer

Emmanuel. M. Decarie emm at scriptdigital.com
Mon May 12 20:47:29 EDT 2003


Hello George,

I did this test also before posting but from apple.com and other 
website. Then I thought that the staging server is behind a firewall. 
So I did exactly what you suggested and now its working with 
getenv('HTTP_REFERER').

So, to make a story short, I can get the referer/referrer :) when I'm 
in the firewall, but from outside the firewall, I get nothing which 
is a bummer.

Thanks for your help.

>	It sounds like your server config is not showing you all
>the useful variables, but I just wanted to make sure you already
>checked the following general HTTP issue:
>
>	Web pages only have "referers" when a previous document
>hyperlinked to them.  If you just type the URL of your web page
>into a web browser, there won't actually be a referer, because no
>other (previous) page referred to it.  In this case the referer
>variable is either unset, blank, or perhaps just a hyphen (this
>is what the Apache logs seem to use).
>
>	For testing purposes, you can create a short HTML page
>which just hyperlinks to your web (PHP or Perl) page.  Then, your
>PHP or Perl script will show the URL of the short HTML page as
>the "referer."
>
>	So make sure your PHP/Perl page really does have a "referer"
>before you start blaming PHP or IIS for not showing it to you!
>
>Best, George.

-- 
______________________________________________________________________
Emmanuel Décarie / Programmation pour le Web - Programming for the Web
Radio UserLand/Frontier - Perl - PHP - Javascript  <http://scriptdigital.com/>
Blog: <http://blog.scriptdigital.com> - AIM: scriptdigital




More information about the talk mailing list