CURL or Web Service


I’d really appreciate any suggestions for the best way for hooking up two websites so that one feeds the other with data. Essentially I need one site to be the master, including database, and the second site to be as dumb as possible.

I quite like the look of CURL. However, although I’m pretty clear on how my dumb site would fire off a request and process the response, I can’t find much to explain how the master site would process the request and fire back some data. Any pointers or links would be great.

I need this to be robust and secure and don’t know whether I’d be better looking at a web services approach, but seems overkill when I have no intention of giving anyone access to the same data.

Many thanks in advance for ideas and comments.

If they are hosted with the same host, or if the host with the db on allows remote access you could just set the ‘dumb’ site to log into the db on the main account. This will depend on your host if they allow this, but it would certainly be quicker and easier as there’s no extra coding.


I need this to be scaleable and have the option to add other dumb sites so need to find a solution that would work on two different servers.

Sounds to me as if the smart site should just output data and be query-able via an API.

This then also opens the opportunity for you to offer your API to others to use (for a price?) and also act as a data source for mobile versions of you site and so on.

[google]api design[/google]