What I want to do: When a user views the page, I want to check whether
they're coming from another page on my site or whether this is the first
page that they're viewing.  If it's the first page, then I want to echo some
code to the browser (it will read the cookie file for my site)

This is the code that I tried to use:
[code]
global $HTTP_REFERER;

$refp = parse_url($HTTP_REFERER);
$refr = $refp[host];

if ($refr != "rideau.prowsej.com")
{
echo "insert javascript here that the browser will execute";
}
[/code]

- My domain is rideau.prowsej.com
- The above code didn't seem to work.

It seemed that a lot of the time, the referer was null.  Under what
conditions would the referer be null (where could I read about the
$HTTP_REFERER variable?)

Any help is much appreciated.  Thanks.

- Joshua Prowse
Rideau High School Student



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to