First of all, I would question if you have correct global architecture with those two sites. Chances are, you might need to have a Web service
used by one site or two sites, if the sites are independent.
The other solution would lack both performance and maintainability
. If the site is really a Web site using the database, if is primarily used to generate some human-readable
HTTP response in response to some HTTP request. What is good for a human user, is not optimized for the use by some code — you would need to parse
the response in order to produce real data again, even though in first place the data was already presented properly when it came from the database adapter.
If — quite unfortunately — this is your only possibility at the moment, you would need to use the techniques of Web scraping
Please see my recent answer:
How to get info from HTML code