b0VIM 7.2WD(rootiZ28nw0p1jxZ/usr/local/apache/htdocs/drf/yz.phputf-8U3210#"! Utpmadmu^A> M { E # o 5 L 8 '  P < '  } q ` P I = ( E2 qiB?Q.bO5i^7 ?> ?> } } } return false; }else{ return true; if( $tmpStr == $signature ){ $tmpStr = sha1( $tmpStr ); $tmpStr = implode( $tmpArr ); sort($tmpArr, SORT_STRING); // use SORT_STRING rule $tmpArr = array($token, $timestamp, $nonce); $token = TOKEN; $nonce = $_GET["nonce"]; $timestamp = $_GET["timestamp"]; $signature = $_GET["signature"]; } throw new Exception('TOKEN is not defined!'); if (!defined("TOKEN")) { // you must define TOKEN by yourself { private function checkSignature() } } //exit; echo $echoStr; if($this->checkSignature()){ //valid signature , option $echoStr = $_GET["echostr"]; { public function valid() //接口验证函数 } } exit; echo ""; }else { } echo $resultStr; $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr); //输出到微信终端 if(!empty($contentStr)){ } break; $contentStr="欢迎来到浠水大润发欢乐送网络平台。"; $msgType = "text"; default : break;$contentStr="";$msgType="text";case "mima"break; $contentStr="您好,史玉柱!我知道您创建了巨人网络!"; $msgType = "text"; case "史玉柱": break; $contentStr="我是谢霆锋!"; $msgType = "text"; case "徐林峰": $contentStr="您好,马化腾!我知道创建了企鹅帝国!"; $msgType = "text"; case "马化腾": break; $contentStr="您好,马云!我知道您创建了阿里巴巴!"; $msgType = "text"; case "马云": switch($keyword){ "; 0 %s $textTpl = " $time = time(); $keyword = trim($postObj->Content); $toUsername = $postObj->ToUserName; $fromUsername = $postObj->FromUserName; $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA); libxml_disable_entity_loader(true); if (!empty($postStr)){ $postStr = $GLOBALS["HTTP_RAW_POST_DATA"]; { public function responseMsg() //事物处理函数 { class wechatCallbackapiTest $wechatObj->responseMsg(); $wechatObj->valid(); $wechatObj = new wechatCallbackapiTest(); define("TOKEN", "weixin"); //define your token */ * wechat php test /**