Dear All,
i appreciate your hints to the following:
a client is sending an URL to the server f.e. "GET /index.php?info&id=xxxxxxx&comp=AL......"
With QUERY_STRING i can extract the command (info) and all other parameters (id,comp...).
The client sends a command create&id=xxxxx$comp..... and immediately some entity headers with infos like x-comp: data; content-type: application/xxx; ..... and immediatley the data.
Again i can filter the command and the parameters. But pls how to get all following entity headres and the data.
I tried with several functions like getallheaders() but i get only the request headers .... I need to parse the entity headers.
I have PHP4,Apache.
Thanks a lot for your help !
Regards,
Tony
How can i get entity headers
Moderator: General Moderators
not really sure what you want, i once wanted to handle xml posts from xml, and the parsing didn't really put the thingies i wanted in $_SERVER, $_POST etc... So i found to return the whole request.
Code: Select all
$data = file_get_contents('php://input');Thanks for your reply.
Unfortunately this dows not work.
I give you more info:
Here is an extract of a port scanner program, which captures the data from the client:
POST /test.php?create&contRep=T1&docId=40AB HTTP/1.0
Content-type:multipart/form-data; boundary=KoZIhvcNAQcB
Connection: close
Content-Length: 5216
--KoZIhvcNAQcB
Content-Disposition: form-data; filename="data"
X-compId: data
Content-Type: application/x-test
Content-Length: 4919
data data data ...........
As you can see after the request headers the entity headers follow then the data.
I need to parse the entity headers (data properties) and save the actual data in a file.
Can apache pass these infos to the php script !
Any idea.
Thanks again
Tony
Unfortunately this dows not work.
I give you more info:
Here is an extract of a port scanner program, which captures the data from the client:
POST /test.php?create&contRep=T1&docId=40AB HTTP/1.0
Content-type:multipart/form-data; boundary=KoZIhvcNAQcB
Connection: close
Content-Length: 5216
--KoZIhvcNAQcB
Content-Disposition: form-data; filename="data"
X-compId: data
Content-Type: application/x-test
Content-Length: 4919
data data data ...........
As you can see after the request headers the entity headers follow then the data.
I need to parse the entity headers (data properties) and save the actual data in a file.
Can apache pass these infos to the php script !
Any idea.
Thanks again
Tony