'Accept' request header should be set. If you are accessing from a web browser, it will set the 'Accept' header paramter as 'text/html' and so you will get a html response. You can set the 'Accept' parameter value to 'application/xml' or 'application/json' to get respective output. You should use a RESTful web service client to check that out. Go back and read through the tutorial for more information.
https://phppot.com/demo/php-restful-web-service/mobile/list/ https://phppot.com/demo/php-restful-web-service/mobile/list/1/