- 博客(0)
- 资源 (1)
空空如也
微信开发源码
微信开发自动回复以及关注回复代码
< php
define "TOKEN" "weixin" ;
$wechatObj new wechatCallbackapiTest ;
$wechatObj >responseMsg ;
$wechatObj >valid ;
class wechatCallbackapiTest
{
public function valid
{
$echoStr $ GET["echostr"];
valid signature option
if $this >checkSignature {
echo $echoStr;
exit;
}
}
public function responseMsg
{
get post data May be due to the different environments
$postStr $GLOBALS["HTTP RAW POST DATA"];
extract post data
if empty $postStr {
$postObj simplexml load string $postStr "SimpleXMLElement" LIBXML NOCDATA ;
$RX TYPE trim $postObj >MsgType ;
switch $RX TYPE
{
case "text":
$resultStr $this >handleText $postObj ;
break;
case "event":
$resultStr $this >handleEvent $postObj ;">微信开发自动回复以及关注回复代码
< php
define "TOKEN" "weixin" ;
$wechatObj new wechatCallbackapiTest ;
$wechatObj >responseMsg ;
$wechatObj >valid ;
class wechatCallbackapiTest
{
public function valid
{
$echoStr $ GET[&quo [更多]
2014-03-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人