Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-07-2004, 09:48 AM   #1
Registered: Jan 2004
Posts: 35

Rep: Reputation: 15
Accessing http header in PHP

That sound realy silly, but i can't access the http header sent by the user agent.

I tryed the $GLOBALS['HTTP_RAW_POST_DATA'] and the $HTTP_RAW_POST_DATA variable (after i turned on the setting in php.ini)

But when i try to echo or print_r it, it always print nothing ;-(

What is the easy way to see the full http header in php ?

Old 08-07-2004, 10:20 AM   #2
Registered: Aug 2004
Location: Switzerland
Distribution: debian
Posts: 149

Rep: Reputation: 15
The variable you're looking for ist $_SERVER.
It contains information such as information such as headers, paths, and script locations.
see for detailed information (such as the keynames of the array).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Header Script newuser455 Programming 1 08-30-2005 05:33 PM
Accessing FTP via. HTTP proxy? ben_hero Linux - Networking 2 03-02-2005 09:32 AM
forward IP based on http IP header freibuis Linux - Security 7 08-24-2004 12:21 AM
Errors on accessing Swat SAMBA http://localhost:901 @ Mandrake 9.0. Zepiroth Linux - Networking 2 06-03-2003 09:51 PM
Error reading WWW server response (HTTP Header)?? cuboctahedron Linux - Newbie 7 02-20-2003 04:10 AM

All times are GMT -5. The time now is 05:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration