I have a website which will act as a main store for all information and will have an SSL certificate. I then have about 10 satellite sites that need to periodically (from a cron script) but also on demand be able to exchange data between themselves and the main site. So basically the satellite site needs to be able to send data to the main data storage site, and the main data storage site needs to be able to send data to the satellite sites. I’m thinking XML as the data structure but I’m not sure how best to transport it, (SOAP, CURL etc) anyone have any ideas?
I was thinking maybe make an API that can be called with SOAP and transfer data in this way?
All the sites are PHP/MySql btw
does this sound like a good plan?
Any suggestions much appreciated thanks
This is a matter of opinion, but SOAP is almost certainly overkill in your situation. Just use regular HTTP GET and POST. The client should send name and value pairs indicating which information it needs, and send back the data in a format that’s easy for you to parse in your client. If you’re comfortable with XML use that. If JSON or even CSV work better for the type of data you’re transmitting, use that instead. Generally speaking, I’d use the simplest approach that will work for your requirements, especially because you’re not exposing the service to external users.