ultrus Posted July 23, 2008 Share Posted July 23, 2008 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. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted July 23, 2008 Share Posted July 23, 2008 Check out the cURL library. Quote Link to comment Share on other sites More sharing options...
widox Posted July 23, 2008 Share Posted July 23, 2008 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 Quote Link to comment Share on other sites More sharing options...
ultrus Posted July 23, 2008 Author Share Posted July 23, 2008 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.