Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a basic web services in php

I want to find how to create a simple web service using PHP. I am new to web service. Is there any tutorial so I can learn it from the start. Thanks all.

I want to host this webservice so I can use this web service in android app development I own my hosting space.

like image 986
sandy Avatar asked Jun 28 '11 14:06

sandy


People also ask

Can we create a web service in PHP?

You can use any existing PHP framework like CodeIgniter or Symfony or CakePHP to build the webservices.

What is a web service in PHP?

Web services are XML-based information exchange systems that use the Internet for direct application-to-application interaction. These systems can include programs, objects, messages, or documents. A web service is a collection of open protocols and standards used for exchanging data between applications or systems.


1 Answers

There is nothing particularly special about a web service when compared to any other kind of site. The major difference is that output is generally in a format other than HTML, these days it is usually JSON, which has its own section in the PHP manual

Aside from that it is just a matter of having sensible URIs, which may take sensible query strings or post data, and may require some kind of authentication (just like any other site).

like image 75
Quentin Avatar answered Oct 20 '22 12:10

Quentin