requesting with http
Posted: Sun Dec 17, 2006 12:48 pm
I've got a script that is called by a client, and needs to request an http response from another site by passing it xml information in its body. I've done a similar thing in php before, but never involving passing body information to the the other site, only the filename with the info being passed in GET format.
ex:
Is there a command that would allow me to accomplish the same thing, while passing XML data as well, ie:
-request the page http://www.xxx.com
-send along this text with the request: <?xml version="1.0" encoding="UTF-8"?><response>...</response>';
The xml data can't be stored in GET or POST, it has to be passed in the request body
Thanks very much.
ex:
Code: Select all
// Get a website response into an array.
$lines = file('http://www.xxx.com/' . $_GET['name']);-request the page http://www.xxx.com
-send along this text with the request: <?xml version="1.0" encoding="UTF-8"?><response>...</response>';
The xml data can't be stored in GET or POST, it has to be passed in the request body
Thanks very much.