View Full Version : how to read headers?
09-22-2005, 09:49 PM
how can i get ALL headers sent from a remote host to a srerver when calling some file?
any difference in headers for:
09-22-2005, 10:00 PM
oh, and what if i set a non-existant header with function
does server send it? does user agent receives it? does it produces error?
and what the opposite way - if i somehow set up non-exisztant header with my browser? how can i read it in server?
09-23-2005, 09:57 AM
I'm not sure about your last question, what would be the point of sending a 'fake' header to the client?
Oh, apache can pick up headers using apache_request_headers() (http://ca3.php.net/manual/en/function.apache-request-headers.php), but I'm uncertain if there is a similar option for other server applications.
09-23-2005, 02:22 PM
that headers_list() is from php5 on... but its okay with apache, almost everybody is using it.
whay sending fake header... complicated story, basically, that would be the way to avoid follow the Location: header in certain moments...
09-23-2005, 02:27 PM
Hmm, you can try apache_response_headers() (http://ca3.php.net/manual/en/function.apache-response-headers.php) which is available on php 4.3.0+
I still don't understand why you would need fake headers. I mean, I make use of only three types:
within my php. If its a variable method of some sorts, you'd be looking at sessions. But fake headers I would tend to think would end up being unreliable as the brower will discard what it doesn't use, and won't give you what it cannot understand.
09-24-2005, 01:04 PM
i think i wont - at least not if i call a file via xmlhttp method :)
yes, i tested it - headers('stupid: yes'); has been shown normally when called the getAllResponseHeaders() and getResponseHeader('stupid') yiha:):):):):)
09-26-2005, 09:36 AM
hmmm.. the question was how do i read entire headers, RECEIVED from a browser... any help here?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.