Jump to content

HTTP communication from one server to another brainstorming - any thoughts?


ultrus

Recommended Posts

Hello,

I'm just brainstorming at the moment. I think it would be cool to set up a web service so that one of my websites could send requests to another server and get results back. - like Google Checkout or PayPal notifications. Am I correct that HTTP POST communication would be good for this? Any thoughts on where to start? Do you feel XML would be the format of info to go both ways?

 

What if there are multiple steps? An example would be having to virtually log in before sending or receiving something, or do I just send that info along with my initial request?

 

Also, what if I want one server to send files to another server? For example, I upload an image to one website, which sends the file to other websites I manage using php scripts. I guess I could tell the other servers where the file is, and have them send a request afterwards which downloads the file... but I would prefer to send the file, with a success or failure message coming back. What is your insight on this topic?

 

Thanks for the feedback. I know this is kind of abstract at the moment, but I would appreciate your expertise on the matter. :)

Do some searching on API's, in particular REST (Representational State Transfer) http://en.wikipedia.org/wiki/Representational_State_Transfer. It's a simple architecture for communicating services. Also, check out oAuth for authentication. This could potentially be a pretty large project.

 

On the other hand, you could just create a couple PHP scripts on your server(s) and call them with cURL and parse the response as needed. Depends on how far you wanna go.

 

HTH

Thanks for the input! REST is a good start. So far, it seems that the client side is the complicated part, and the other server sending back info could simply deal with the $_POST (or whatever) data and send echo some generated XML back as the response. Authentication might be a challenge but it looks loke cURL may have that built in somewhere if I remember my reading correctly so far. I think I'm on the right track now. Thanks! :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.