Hi All,
I need some help please, if someone is sending me an xml when they call my php file, how do I grab that xml file in my php code?
I need to get that file and parse it.
Any Ideas?
thanks
WING
Get Parameter
Moderator: General Moderators
Re: Get Parameter
This is how my partner would be sending it.
"I would make an HTTP POST request to an URL like http://server.com/shippinglabel.php. Thus I assume that an apache runs on a host and that it has an PHP module installed and that there exists a file shippinglabel.php that extracts the XML file from the HTTP request body and processes it. All information would be in the posted XML file, so there are no more URL parameters. We will use the following request header:
Content-Type: text/xml.
Accept: text/xml
Note that we will NOT use
Expect: 100-continue
Thus, the XML file will be sent with the request headers, not in a second transaction only after the apache server answered with a 100-continue HTTP status code.
We do this since we don't talk to an anonymous server over the Internet but expect the server to process the text/xml in any case."
let me know if you need more information
Thanks
WING
"I would make an HTTP POST request to an URL like http://server.com/shippinglabel.php. Thus I assume that an apache runs on a host and that it has an PHP module installed and that there exists a file shippinglabel.php that extracts the XML file from the HTTP request body and processes it. All information would be in the posted XML file, so there are no more URL parameters. We will use the following request header:
Content-Type: text/xml.
Accept: text/xml
Note that we will NOT use
Expect: 100-continue
Thus, the XML file will be sent with the request headers, not in a second transaction only after the apache server answered with a 100-continue HTTP status code.
We do this since we don't talk to an anonymous server over the Internet but expect the server to process the text/xml in any case."
let me know if you need more information
Thanks
WING
Re: Get Parameter
Then yes, the code I posted.