javascript - After following the WeChat official account, you will receive a picture with a WeChat avatar and a QR code. How was this image generated?
PHP中文网
PHP中文网 2017-05-27 17:42:17
0
3
842

After following the WeChat official account, you will receive a picture with a WeChat avatar and a QR code. How was this image generated?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
洪涛

The QR code should be a reference QR code. You can follow the statistics based on this QR code

Yes, these three pictures are combined into one (the imagecopymerge method I used)
Let’s talk about the acquisition of these three pictures respectively
1. Obtain the reference address with the QR code and the QR code document with the parameter
2. Obtain the user avatar The user information contains
3. The background image is prepared by yourself
Then use image processing method to combine these three images into one image at the corresponding position

仅有的幸福

The questioner is talking about after following the official account, jump to the conversation window, will the official account send you pictures in the conversation window? If so:
Developers can have a server configuration in the development settings of the public management platform, Configure a server URL in it, which is actually the API accepted by the official account's events and messages. Developers can perform various logical processing in the API themselves.
When users follow the official account, the API will receive WeChat push messages Pay attention to the event Event=subscribe. The message body contains the user's openid. With this openid, you can do a lot of things, such as pulling the user's information (avatar, nickname, etc.), and then you can use it according to your own business logic. Process the desired results and return them in the push of the event of interest, and the user will receive various information.

PHPzhong

If the QR code is connected to the avatar, generate the QR code and then fill it into the picture template. Then follow it and call WeChat SDK to push it out.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!