I can use DOM fine in PHP to manipulate XML and display it properly. My question is how could I implement this web service that could take in search from the form and collect the data from the mysql, transform it into an XML file and maintaining some sort of pagination.
PHP
Last Comment
Ray Paseur
8/22/2022 - Mon
namsu55
ASKER
Note I already have search implementation from MYSQL and pagination how ever I am interested in web service.
Just trying to learn web services. I want to make a php web service where I can produce an xml file from mysql result, and then maybe try in future to merge results from another similar service together, based on the same XML. The reason why I talk about pagination is because we use it with all searches and im not sure how I would use MYSQL and XML to do this. Would I have to put all search results in XML or like the 10 links per page limit put 10 links into XML and then use that.
Pagination is usually used in the HTML output from a query - for example, if a query is giving you hundreds of rows in the results set, you would break up the output to create smaller web pages.
I have nothing against SOAP, but I am a bigger fan of RESTful interfaces. In the REST model, you give all the signals in the URL query string and the web service returns the responses has a string, probably CSV or XML. A good example is the Yahoo API discussed here:
The advantage of the REST approach is that you do not have to know anything about how the web service works. This makes the calling sequence much simpler.