This is a discussion on How to get http header infomation using PHP? within the PHP Language forums, part of the PHP Programming Forums category; Hi all, Is there any way to get all the information in HTTP header? I want to get a item ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all,
Is there any way to get all the information in HTTP header? I want to get a item called "Referring URL" in HTTP header. I find the information is not contained in the environment global variable $_SERVER. Thank you for suggestions! |
|
|||
|
Lian <lian@dsdfsdf.com> wrote:
> Is there any way to get all the information in HTTP header? I want to > get a item called "Referring URL" in HTTP header. I find the information > is not contained in the environment global variable $_SERVER. print_r($_SERVER) prints all available headers and more. The referrer is probably stored in 'HTTP-REFERER' IIRC. BTW know that referrer is totally unreliable. Some clients or proxys filter them, or anyone can easily forge them. -- Daniel Tryba |
|
|||
|
Lian wrote:
> Is there any way to get all the information in HTTP header? I want to > get a item called "Referring URL" in HTTP header. I find the information > is not contained in the environment global variable $_SERVER. Maybe the browser you're testing with is like mine and doesn't send that information to the server. For browsers that do send the 'REFERER' it appears in the $_SERVER array. If you can trust it or not is another completely different story. > Thank you for suggestions! Try to do whatever you're trying to do with $_SESSION variables. -- USENET would be a better place if everybody read: http://www.expita.com/nomime.html http://www.netmeister.org/news/learn2quote2.html http://www.catb.org/~esr/faqs/smart-questions.html |