Page 1 of 1

sending http response to post

Posted: Fri Jul 17, 2009 9:09 pm
by rkatl
I have made a php script that tales a $_POST input from a different website and then parse the data and send a response back to the sender. There will be many senders who do $_POST 's to the script but I cant figure out how to send the response back toe the requester.

The response from that post is just a comma delimited string of data. Like:
ERROR:abc:abc1 or NOERROR.

Any idea how can I simply send a http response? I looked at the curl function, I think it is more for posting the data to a url

Appreciate your help.

Re: sending http response to post

Posted: Fri Jul 17, 2009 9:50 pm
by requinix
If you're supposed to send data back to a specific URL then use cURL.

Otherwise just output the data and the sender will pick it up from there.

Re: sending http response to post

Posted: Fri Jul 17, 2009 10:06 pm
by rkatl
output means.. using echo ?

Re: sending http response to post

Posted: Sat Jul 18, 2009 12:21 am
by requinix
rkatl wrote:output means.. using echo ?
Or print, or printf, or whatever you want.