About the PHP API

Source: Internet
Author: User
Beginner PHP, the knowledge of the API for 0, query some information, or do not understand, please God with easy to understand the words of the API to say it, the younger brother kneeling Xie.


Reply to discussion (solution)

API interface

APIs (application Programming Interface, application programming interfaces) are pre-defined functions designed to provide the ability of applications and developers to access a set of routines based on a piece of software or hardware without having to access the source code. Or understand the details of the internal working mechanism. API In addition to the application of the "application Interface" meaning, but also refers to the API's documentation, also known as the Help document.

API interface

APIs (application Programming Interface, application programming interfaces) are pre-defined functions designed to provide the ability of applications and developers to access a set of routines based on a piece of software or hardware without having to access the source code. Or understand the details of the internal working mechanism. API In addition to the application of the "application Interface" meaning, but also refers to the API's documentation, also known as the Help document.



These have been looked at, but I have not written, my main question is: How do I define my own API, or I want to define a my own API is probably divided into what steps?

Since you need to provide an API for others to use, then you need to plan:
Call mode : function, Xml-rpc, REST, Web service 、.....
If it is a function, you also need to install the support library on the user side
parameter Format : includes the organization of incoming, outgoing data
Obviously all APIs should follow the same rule
Concrete implementation, that's your business.

There are 2 types of PHP API, one is the copy code into its own project, through some kind of grammar rules directly call, but will directly expose the code, there is a Web page like to submit some parameters directly to get results, but this requires the other side to open the server.

  • Related Article

    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.