Page 1 of 1

Http request headers

Posted: Mon May 05, 2003 10:07 am
by jkmcgrath
Hi all,

Here is what I am trying to do,

Retrieve the data that is in the http request header for traffic analysis. I want to get the broweer, ip, operating sys, language, page requested, referer, host and keyword.

Below is what I have been able to dig up so far.

$_SERVER['PHP_SELF']
$hostname
$_SERVER['REMOTE_ADDR']
$HTTP_REFERER
$HTTP_ACCEPT_LANGUAGE

That is pretty much my entire want list but but I am short the keyword. But I am just searching blindly.

Where can I find the way to retrieve this infromation? I have just been doing it by trial and error so far and have hit a road block. Surely somewhere there is the information on how to retrieve the data that is in the header. I have found alot that tells me what is in the header but have found NONE on how to retrieve the data :cry:

Thanks
John

Posted: Mon May 05, 2003 10:15 am
by volka

Posted: Mon May 05, 2003 10:16 am
by []InTeR[]
I don't know what keyword you meen.
But if you do a var_dump on $_SERVER you sould see allmost all the global vars.

You can also take a look with phpinfo();

That was fast!

Posted: Mon May 05, 2003 10:16 am
by jkmcgrath
Thanks that was extremely fast! :)

Keyword(s)

Posted: Mon May 05, 2003 10:17 am
by jkmcgrath
What the keyword was used by the search engine to find the page.

Posted: Mon May 05, 2003 11:03 am
by volka
no search engine used. It's mentioned in the appendix of the php online manual.