Re:HTTP Header REFERER
| From: | Erin's Fan Club | Date: | Wed, 28 Feb 2001 00:13:54 +0000 |
| Subject: | Re:HTTP Header REFERER | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-5745@lists.php.net to get a copy of this message | ||
Hi:
For me this code works on Win2k Pro running Apache and PHP v4.02pl2;
<?php
echo $HTTP_REFERER;
?>
Otherwise, you could get Javascript to pass the variable onto the
request url passed to the PHP script. I think the syntax is nearly the
same for Javascript so you would just need to tack it on to the request
uri like...
http://server.com/my_file.phpHTTP_REFERER=<script>$http_var</script>
Or even retrieve it through a simple Perl script.
>In apache, the variable:
>HTTP REFERER is automatically set.
>I don't run apache, I tried to access the variable like this in a
>regular script:
>
><?php
>echo "$http referer";
>?>
<<SNIP>>
>Thanks in advance
>RDB
Hope this helps, regards Jerry