Re: http_referer
| From: | David Robley | Date: | Wed, 21 Jun 2000 05:47:12 +0000 |
| Subject: | Re: http_referer | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2439@lists.php.net to get a copy of this message | ||
On 20 Jun, Erik Stainsby wrote:
> The previous suggestion was to check $HTTP_REFERER not $http_referer
> Case does matter. (Although I'm not certain that variable exists...)
>
> Try sticking <? phpinfo() ?> into your page and seeing what vars
> are available when it gets returned to you. This will dump a very
> pretty and useful series of tabled info about your system's setup.
>
> HTH, Erik
>
>
Well, it does exist, but only when it exists ;-) It has a value if, and
only if, the current script has been reached via a link. If you just
type an address into the Location line to go to a page, there will be no
referrer and thus no value in $HTTP_REFERER. And there are other issues
with getting the variable, if you have PHP 4 and use settings in the
'optimised' PHP ini file. But that's another question...
Cheers
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA