Http request headers

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jkmcgrath
Forum Commoner
Posts: 33
Joined: Mon May 05, 2003 10:07 am

Http request headers

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post 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();
jkmcgrath
Forum Commoner
Posts: 33
Joined: Mon May 05, 2003 10:07 am

That was fast!

Post by jkmcgrath »

Thanks that was extremely fast! :)
jkmcgrath
Forum Commoner
Posts: 33
Joined: Mon May 05, 2003 10:07 am

Keyword(s)

Post by jkmcgrath »

What the keyword was used by the search engine to find the page.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

no search engine used. It's mentioned in the appendix of the php online manual.
Post Reply