Home  >  Article  >  [WeChat Interface Library] Share 10 commonly used php WeChat interface classes

[WeChat Interface Library] Share 10 commonly used php WeChat interface classes

伊谢尔伦
伊谢尔伦Original
2017-06-06 17:39:592752browse

WeChat interface Mainly uses the WeChat authorized login interface, WeChat JSSDK sharing interface, and WeChat payment interface. First, let’s take a look at the legendary WeChat API interface document. The official website says that using the WeChat interface requires a certified service account. If you don’t have one, you can apply for a test account to experience it, but it cannot be promoted in Instructions on the web page authorization callback domain nameThe document is relatively clear. If a third-party platform is not used, you need to configure the path that the project needs to obtain WeChat user information. One or two... Any domain name is acceptable. For more specific interface content, please refer to WeChat official documentation. We are mainly talking about php WeChat interface classes here. In order to help friends better develop PHP WeChat, php Chinese website provides 10 commonly used and valuable WeChat interface classes for friends to download and refer to. (ps: For more WeChat interface resources, please pay attention to php Chinese website WeChat interface class)

1. php implements WeChat public platform account custom menu library

WeChat public platform service accounts can apply for custom menus. Other accounts do not support custom menus for the time being. This can not only be operated using the API, but also the menus and parameters can be defined directly in the background.

Apply for custom menuService accounts can apply for custom menus. Official accounts that use QQ to log in can be upgraded to email login. Official accounts that use email to log in can modify the login email address and group messages can be synchronized. Go to Tencent Weibo.

2. PHPToQyWeixin PHP calls the enterprise WeChat API interface underlying class library

This project is written based on personal preferences and actual development needs and designed. The main function is to complete the encapsulation of the WeChat Enterprise Account API, which is still being continuously improved. By calling the class library and functions of this project, the WeChat Enterprise Account API can be called, reducing development costs. Developers can There is no need to write the underlying code yourself, and this project has made certain optimizations in the acquisition and use of tokens, effectively reducing the frequency of requests to the WeChat server.
This project is designed and developed using object-oriented thinking. Through simple changes to the code, the code can be quickly integrated into other MVC frameworks.
In addition to encapsulating the calls to the WeChat Enterprise Account API, this project also provides several simple additional functions, such as fuzzy search of members, departments and other information by name. In the later stages of improvement, it will be continuously added based on actual needs. Add similar underlying packages for everyone to use.

3. PHP WeChat API interface class

A very comprehensive and detailed PHP WeChat API interface class to help everyone better develop PHP WeChat, interested friends You can refer to, Implement valid verification method: implement docking with WeChat public platform.

4. php WeChat definition operation class

WeChat operation class - updated the custom menu part, WeChat submits the API method, returns WeChat specified JSON, WeChat Get AccessToken and return the at information of the specified WeChat public account

5. php WeChat public platform development interface class SDK full version

phpWeChat public platform development interface class SDK full version , the officially provided SDK only has a text message function, which organizes the message types and event responses of all messages, and adds log records.

6. php uses CURL to simulate the GET and POST classes of the WeChat interface

php The CURL function can imitate users to perform some operations, such as we can imitate users to submit data. You can imitate users to access the website. Let's introduce the GET and POST examples of using CURL to simulate the WeChat interface. The example is very simple, so let's take a look at it together.

7. php WeChat interface Complete encapsulation class

The WeChat public platform interface encapsulates functional class files. Two things to pay attention to in the WeChat interface are text hyperlinks and text line breaks. WeChat uses XML for reply, Content content Do not use CDATA inclusion if special characters are included; in XML data, some special characters must be replaced with escape symbols, and carriage return, line feed, and characters in hyperlink tags are special symbols. If the text in the report XML data requires forced line breaks or hyperlinks, escape characters need to be inserted.

8. php version of WeChat js-sdk payment interface class

This payment class is modified based on the official document! It mainly implements the generation of JS API, Native package signature package and Native response XML format data. Comments are marked with the purpose of each method. Because the package signature is a little complicated, you need to spend more time to read and log the files to compare them one by one! Of course, as long as you use the tutorial classes and set the corresponding parameters, you can correctly generate package parameters, etc.

9. php implements WeChat web page authorization development class

WeChat web page authorization is an advanced function only available for service accounts. Developers can obtain the basic information of users through authorization ; Before this, if you want to obtain message information, you can only obtain user information based on openid when the user interacts with the official account; while WeChat web page authorization can obtain the user's basic information without requiring message interaction or attention.

10. php version of WeChat third-party implementation of one-click login class

describes the PHP version of WeChat third-party implementation of one-click login and the method of obtaining user information, which is more detailed We have analyzed the relevant precautions and implementation techniques for WeChat third-party login. To use WeChat to log in to a third-party web page, you need a "service account", so you must apply to the official website. SDK code: WeChat has an official manual, so I won’t go into details. I’ll study it myself, it’s very simple!


[Related library recommendations]

1 .[php unlimited classification] summarizes the most complete php unlimited classification library download and text video tutorial

2. [php send mail class library] 10 php send Email class library download

3.【php thumbnail class】The latest 10 libraries that use php to generate thumbnails download

4.【 PHP Verification Code] Share 10 useful PHP verification codes

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn