WeChat development class library

Source: Internet
Author: User
* Public platform PHP-SDK, official API part * @ authordodgedodgepudding@gmail.com * @ linkgithub. comdodgepuddingwechat-php-sdk * @ version1.2 * usage: * $ optionsarray (* tokentokenaccesskey, enter your set key * encodingaeskeyencodingaes

/*** Public platform PHP-SDK, official API part * @ authordodgedodgepudding@gmail.com * @ link https://github.com/dodgepudding/wechat-php-sdk * @ version 1.2 * usage: * $ options = array (* token = tokenaccesskey, // enter your set key * encodingaeskey = encodingaes

/**
* Public platform PHP-SDK, official API part
* @ Author dodge
* @ Link https://github.com/dodgepudding/wechat-php-sdk
* @ Version 1.2
* Usage:
* $ Options = array (
* 'Token' => 'tokenaccesskey', // enter the key you set
* 'Enablingaeskey' => 'enablingaeskey', // enter the encryption encodingaeskey
* 'Appid '=> 'wxdk1234567890', // enter the app id of the Advanced Call function.
* 'Appsecret' => 'xxxxxxxxxxxxxxxxxxxxxxxx' // enter the key of the Advanced Call function.
*);
* $ WeObj = new Wechat ($ options );
* $ WeObj-> valid ();
* $ Type = $ weObj-> getRev ()-> getRevType ();
* Switch ($ type ){
* Case Wechat: MSGTYPE_TEXT:
* $ WeObj-> text ("hello, I'm wechat")-> reply ();
* Exit;
* Break;
* Case Wechat: MSGTYPE_EVENT:
*....
* Break;
* Case Wechat: MSGTYPE_IMAGE:
*...
* Break;
* Default:
* $ WeObj-> text ("help info")-> reply ();
*}
*
* // Obtain menu operations:
* $ Menu = $ weObj-> getMenu ();
* // Set the menu
* $ Newmenu = array (
* "Button" =>
* Array (
* Array ('type' => 'click', 'name' => 'latest message', 'key' => 'menu _ KEY_NEWS '),
* Array ('type' => 'view', 'name' => 'I want to search', 'url' => 'HTTP: // www.baidu.com '),
*)
*);
* $ Result = $ weObj-> createMenu ($ newmenu );
*/ <无>

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.