Directly use: PHP to encapsulate WeChat interfaces
Source: Internet
Author: User
Public platform interface PHP100 encapsulation function files are directly used: PHP encapsulation interface /**
* Public platform interface PHP100 encapsulates function files
* Author
* Date 2013-4-9 PRC: E + 8
*/
Define ("TOKEN", "chuangenit ");
$ WechatObj = new wechatCallbackapiTest ();
$ WechatObj-> weixin_run (); // executes the receiver method.
Case "news ":
$ Con. = "{$ o_arr [0]}
";
Foreach ($ value_arr as $ id => $ v ){
If ($ id >=$ o_arr [0]) break; else null; // determines that the number of arrays cannot exceed the set number.
$ Con. ="
<! [CDATA [{$ v [0]}]>
{$v[1]}
{$v[2]}
{$v[3]}
";
}
$ Con. ="
{$ O_arr [1]} ";
Break;
} // End switch
// ============================ End return ================
Echo $ con ." ";
}
Private function checkSignature ()
{
$ Signature = $ _ GET ["signature"];
$ Timestamp = $ _ GET ["timestamp"];
$ Nonce = $ _ GET ["nonce"];
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.