PHP WebService_PHP tutorial

Source: Internet
Author: User
Tags oauth sca
PHP implements WebService. 1. the OAuthOAUTH protocol provides a secure, open, and simple standard for user resource authorization. Unlike the previous authorization methods, OAUTH does not allow third parties to access OAUTH. 1. the OAuthOAUTH protocol provides a secure, open, and simple standard for user resource authorization. Unlike the previous authorization method, OAUTH does not allow a third party to access user account information (such as user name and password)
2. the SCA service component framework (SCA) provides a set of programming models for building service-oriented application systems. Its core concept is service and its related implementation. A service is defined by an interface, and an interface contains a group of operations. Service implementation can reference other services, called references. The service can have one or more attributes that can be configured externally.
3. simple Object Access Protocol (SOAP) is a lightweight, Simple, XML-based Protocol, it is designed to exchange structured and solidified information on the WEB. One of the three elements of WebService (SOAP, WSDL (Web Services Description Language), and UDDI (Universal Description Discovery and Integration), soap is used to transmit information formats, and WSDL is used to describe how to access specific interfaces, uddi is used to manage, distribute, and query webService. you can search simple Web Services instances for specific implementations.
Enabling method:In Windows, you only need to add one line in the PHP configuration file php. ini: extension = php_soap.dll. When configuring and compiling PHP for Unix and Linux systems, the following parameters must be configured:-enable-methods provided by the SoapServer class and SoapClient class extended by soap are used to compile Web services and their client programs.
4. XML-RPCXML Remote Procedure Call, XML Remote method Call. It is a set of Internet-based process calling specifications and a series of implementations that allow programs running in different operating systems and environments. This remote procedure call uses http as the transmission protocol and XML as the encoding format for transmitting information. The definition of XML-RPC is as simple as possible, but it can also deliver, process, and return complex data structures.

SOAP example:Person. php
Soap_server.php
Soap_client.php




This article is an original article specially invited by PHPChina. it cannot be reproduced without permission. if you need to reprint it, please contact shixiang # phpchina.com (# Replace @)

Bytes. Unlike the previous authorization method, OAUTH does not enable third parties to access OAUTH...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.