Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5EE8847700F for ; Fri, 8 Nov 2002 11:44:32 -0500 (EST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by postgresql.org (Postfix) with ESMTP id 339B9476FDB for ; Fri, 8 Nov 2002 11:43:57 -0500 (EST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.6/8.12.6) with ESMTP id gA8Gf2Gx014558; Fri, 8 Nov 2002 09:41:08 -0700 (MST) Date: Fri, 8 Nov 2002 09:27:44 -0700 (MST) From: "scott.marlowe" To: Steven Lee Cc: Subject: Re: Last URL In-Reply-To: <000401c286eb$026eaf40$0301060a@nnz01> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MailBodyFilter: Message body has not been filtered X-MailScanner: Found to be clean X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/36 X-Sequence-Number: 1618 On Thu, 7 Nov 2002, Steven Lee wrote: > Dear all: > > 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? Others have mentioned $_server[], I'll just add that you can see all the names of the vars you can grab by using either phpinfo(); phpinfo gives up lots of various information. You can use different constants with it. See http://www.php.net/manual/en/function.phpinfo.php for more info. or you can implode the array's keys to get a list like this: print implode(":",array_keys($_server)); Just replace $_server with a different array and you can see what keys it has. You can use the same trick on multi-dimensional arrays like so: print implode(":",array_keys($_server['first_key']));