Capturing/ Consuming Content
Posted: Thu Apr 17, 2008 2:20 pm
Hi,
I am creating a web service in which i am posting parameters to a web service using curl. I am now faced with a situation in which the web service needs to me to create a web service to consume a response HTML/ XML POSTEd content from them...My question is...How do i create a web service to "capture" "content" information for e.g. a page
to use pseudo code to help understand the process....
1) I send information to the service via curl and recieve a response which leads me to
a) continue on with my process
b) provide the information to the user for input which is captured by the service directly
2) the service then sends content to me which i must consume/ parse in order to analyse the response
It is the 2) part that is confusing to me...usually if its a form you would simply use $_POST environment to get eh information....however the content coming back to me is in the form
In which RESPONSEDATA is url encoded...
So my question is "how" to i capture this raw data in a php variable?
I am creating a web service in which i am posting parameters to a web service using curl. I am now faced with a situation in which the web service needs to me to create a web service to consume a response HTML/ XML POSTEd content from them...My question is...How do i create a web service to "capture" "content" information for e.g. a page
to use pseudo code to help understand the process....
1) I send information to the service via curl and recieve a response which leads me to
a) continue on with my process
b) provide the information to the user for input which is captured by the service directly
2) the service then sends content to me which i must consume/ parse in order to analyse the response
It is the 2) part that is confusing to me...usually if its a form you would simply use $_POST environment to get eh information....however the content coming back to me is in the form
Code: Select all
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<string >RESPONSEDATA</string>So my question is "how" to i capture this raw data in a php variable?