pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Last URL
4+ messages / 4 participants
[nested] [flat]
* Re: Last URL
@ 2002-11-07 22:57 Ray Hunter <rhunter@venticon.com>
parent: Steven Lee <blindeagle@telocity.com>
1 sibling, 0 replies; 4+ messages in thread
From: Ray Hunter @ 2002-11-07 22:57 UTC (permalink / raw)
To: Steven Lee <blindeagle@telocity.com>; +Cc: pgsql-php
Steven,
You can use the $_SERVER['HTTP_REFERER'] to check...however, this is not
very reliable. Cause is suggested regarding the validity of the value
of this variable.
Here is the link:
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server
On Fri, 2002-11-08 at 05:52, 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?
>
>
> Thank you
>
> Steven
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--
Thank you,
Ray Hunter
^ permalink raw reply [nested|flat] 4+ messages in thread
* Last URL
@ 2002-11-08 05:52 Steven Lee <blindeagle@telocity.com>
1 sibling, 2 replies; 4+ messages in thread
From: Steven Lee @ 2002-11-08 05:52 UTC (permalink / raw)
To: pgsql-php
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?
Thank you
Steven
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Last URL
@ 2002-11-08 06:00 Chris Smith <csmith@squiz.net>
1 sibling, 0 replies; 4+ messages in thread
From: Chris Smith @ 2002-11-08 06:00 UTC (permalink / raw)
To: Steven Lee <blindeagle@telocity.com>; 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 ...../>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Last URL
@ 2002-11-08 16:27 scott.marlowe <scott.marlowe@ihs.com>
parent: Steven Lee <blindeagle@telocity.com>
1 sibling, 0 replies; 4+ messages in thread
From: scott.marlowe @ 2002-11-08 16:27 UTC (permalink / raw)
To: Steven Lee <blindeagle@telocity.com>; +Cc: pgsql-php
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']));
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-11-08 16:27 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-08 05:52 ` Steven Lee <blindeagle@telocity.com>
2002-11-07 22:57 ` Ray Hunter <rhunter@venticon.com>
2002-11-08 16:27 ` scott.marlowe <scott.marlowe@ihs.com>
2002-11-08 06:00 ` Chris Smith <csmith@squiz.net>
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