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. :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.