I'm going to suggest using a ASHX page and soap since your using PHP to access the service, and I assume that a request with proper credentials from any domain can use the service.
Basically you write a WSDL file that defines your table request, and different possible responses that you may send back such as faults, warnings, errors, and the actual data requested.It's like XML, or sort of like XSD.
Then you write a class to receive the SOAP request, access the database, package the data, send back the response.
Now you register that class on the ASHX page, and place the page on the web server.
I could not find any easy to understand examples of the whole process, but found some simple examples, and talk about the subject.