From: Chris Smith <csmith@squiz.net>
To: Steven Lee <blindeagle@telocity.com>
To: pgsql-php@postgresql.org
Subject: Re: Last URL
Date: Fri, 08 Nov 2002 17:00:58 +1100
Message-ID: <5.1.0.14.0.20021108165841.028a5870@cooee.squiz.net> (raw)
In-Reply-To: <000401c286eb$026eaf40$0301060a@nnz01>
References: <00c901c285b4$37c57490$5340baca@gis>
Hi,
>I try to write a logging page which can know how the users find my site.
>if by search engine or some banner switch, they must from another site
>(yahoo,xxx.com etc.)
>I try to find it in $HTTP_SERVER_VARS[], seems no, I am not sure.
>Is ther any Possible way that I can know what is the last URL before the
>user get into my site?
Have a look in $_SERVER for php4.1.0 and later. There's a variable
called 'HTTP_REFERER'..
From the manual ..
The address of the page (if any) which referred the user agent to the
current page. This is set by the user agent. Not all user agents will set
this, and some provide the ability to modify HTTP_REFERER as a feature. In
short, it cannot really be trusted.
It only gets set when you click on a link to go to the site, not if you go
there yourself with the url.
HTH.
Chris.
.....>> Open Source - Own it - Squiz.net ...../>
W: http://www.squiz.net/
.....>> Open Source - Own it - Squiz.net ...../>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: csmith@squiz.net, blindeagle@telocity.com
Subject: Re: Last URL
In-Reply-To: <5.1.0.14.0.20021108165841.028a5870@cooee.squiz.net>
References: <00c901c285b4$37c57490$5340baca@gis> <5.1.0.14.0.20021108165841.028a5870@cooee.squiz.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox