sending http response to post

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rkatl
Forum Newbie
Posts: 17
Joined: Tue Apr 22, 2008 8:20 pm

sending http response to post

Post 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.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: sending http response to post

Post 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.
rkatl
Forum Newbie
Posts: 17
Joined: Tue Apr 22, 2008 8:20 pm

Re: sending http response to post

Post by rkatl »

output means.. using echo ?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: sending http response to post

Post by requinix »

rkatl wrote:output means.. using echo ?
Or print, or printf, or whatever you want.
Post Reply