Re: Last URL

From: Chris Smith <csmith(at)squiz(dot)net>
To: "Steven Lee" <blindeagle(at)telocity(dot)com>, <pgsql-php(at)postgresql(dot)org>
Subject: Re: Last URL
Date: 2002-11-08 06:00:58
Message-ID: 5.1.0.14.0.20021108165841.028a5870@cooee.squiz.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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 ...../>

In response to

  • Last URL at 2002-11-08 05:52:23 from Steven Lee

Browse pgsql-php by date

  From Date Subject
Next Message Carlos García Gómez 2002-11-08 08:00:42 Problem with html select lists and postgres
Previous Message Steven Lee 2002-11-08 05:52:23 Last URL