Hi:
For me this code works on Win2k Pro running Apache and PHP v4.02pl2;
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...
You could try to create a listing of defined globals, something like
";
while (list($key, $value) = each($GLOBALS))
echo "$key => $value\n";
echo "";
?>
and look how your webserver defines the HTTP_REFERER variable.
Anyway, there are situations where NO referer variable is available. That's
I think HTTP_REFERER works only for apache. To obtain values for HTTP
header vars without apache, you could use
HTTP_ENV_VARS["HTTP_REFERER"] as this is a php variable. Hope it
works right,
Gonzalo.
> In apache, the variable:
> HTTP_REFERER is automatically set.
> I don't run apache, I tried
Randall,
You're missing a proper web server...:-)
Seriously, $HTTP_REFERER and getenv("HTTP_REFERER") should work.
If not $GLOBALS["HTTP_REFERER"] should also work.
try this:
echo "HTTP_REFERER is $HTTP_REFERER, ".$GLOBALS["HTTP_REFERER"].",
".getenv("HTTP_REFERER");
and see whi