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.