This post has already been read 4856 times!
There is a list at the official PHP website: http://www.php.net/manual/en/refs.webservice.php You can see that PHP can work with OAuth, SCA, SOAP, Yar and XML-RPC. But there is another way which is so simple to create a webservice. It is JSON.
How to create a simple web service with JSON
I will show how to create a simple web service with JSON. Our service will get the parameters by using $_GET , therefore we will put the parameters to url.
For instance : http://mywebserviceurl.com?s=myparameter so the service will answer depending on myparameter.
Lets look at service's index file
Thats all. You will see the JSON results on the screen. You can validate the JSON results with the help of some sites.
How to get results of a web service ?
Your application will ask this webservice something, then the service will give response with a json result. Your application should get the results with a reader to read the webservice's output.
In PHP, you can do that with file_get_contents() function.
Here is an example of my php application: readwebservice.php