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