Peter Clarke [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Rainer Kohnen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,
is there a way to get the full HTTP Header
without patching PHP?
I use a debugger coded in PHP a lot. Now i need
to debug some intershop enfinity pages. However,
enfinity uses a lot of fields with the same names.
So my debugger overwrites the variables and i get
only the last one. As i cant change the code
(wouldn't work anymore then) i cant debug without
having access to the full http header.
(i can make arrays for duplicate variables for
myself then)
Same problem with some kind of e-cash system.
It validates itself by putting a signature into
the header. However, PHP cant validate the header
as i have no chance to get the original header.
(And i cant rebuild the original header of course)
If there is no way without patching to
get these informations are there any plans to
integrate a function for getting the header
in future versions of php?
thanks
Have you tried:
http://www.php.net/manual/en/function.getallheaders.php
$headers = getallheaders();
while (list ($header, $value) = each ($headers)) {
echo $header: $valuebr\n;
}
Yes, did not work for me.
What i need is the exact content of a POST and the
header itself.
For example: when i check the signature of a header,
how can i know if the header contains:
Content-Type: application/x-www-form-urlencoded
or
Content-Type: application/x-www-form-urlencoded
(note the extra space)
So what i like to have is the exact POST request sent
from the users browser to the apache server as
a single string oder array of strings for each line
(not parsed!).
A POST may look like this:
---
POST /anmeldung_index.html HTTP/1.0
Host: www.testserver.work
Content-length: 67
fstatus=1username=petersearch=bananasearch=drinksearch=daiquiri
---
As you can see there are 3 times search in the POST.
PHP itself will give me only the last one but if i can get
the original request its easy to parse it into an array for
myself.
The other problem is with authentication signature:
---
POST/anmeldung_index.htmlHTTP/1.0
Host: www.testserver.work
signature: 43jgb34u545u6FGH3456hjSDFg2345456-dfg43j45h6gGFGH
Content-length: 67
fstatus=1username=petersearch=bananasearch=drinksearch=daiquiri
---
To verify this i need the exact request, as a string,
not preparsed in any form.
Thanks anyway :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]