Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DBF1847610D for ; Fri, 8 Nov 2002 00:55:58 -0500 (EST) Received: from cooee.squiz.net (cooee.cybersydney.com.au [203.25.173.1]) by postgresql.org (Postfix) with SMTP id 939A4475EBB for ; Fri, 8 Nov 2002 00:55:55 -0500 (EST) Received: (qmail 24649 invoked by uid 509); 8 Nov 2002 05:56:01 -0000 Received: from csmith@squiz.net by cooee.squiz.net by uid 0 with qmail-scanner-1.14 ( Clear:. Processed in 0.028174 secs); 08 Nov 2002 05:56:01 -0000 Received: from pc149.cybersydney.com.au (HELO avenger.squiz.net) (203.25.173.149) by cooee.cybersydney.com.au with SMTP; 8 Nov 2002 05:56:01 -0000 Message-Id: <5.1.0.14.0.20021108165841.028a5870@cooee.squiz.net> X-Sender: csmith@cooee.squiz.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Fri, 08 Nov 2002 17:00:58 +1100 To: "Steven Lee" , From: Chris Smith Subject: Re: Last URL In-Reply-To: <000401c286eb$026eaf40$0301060a@nnz01> References: <00c901c285b4$37c57490$5340baca@gis> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/33 X-Sequence-Number: 1615 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 ...../>