LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Accessing http header in PHP (https://www.linuxquestions.org/questions/programming-9/accessing-http-header-in-php-214648/)

artois_val 08-07-2004 09:48 AM

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 ?

Thanks

Charalambos 08-07-2004 10:20 AM

The variable you're looking for ist $_SERVER.
It contains information such as information such as headers, paths, and script locations.
see http://ch.php.net/manual/en/reserved...riables.server for detailed information (such as the keynames of the array).


All times are GMT -5. The time now is 08:35 AM.