微信公众号服务器配置代码记录

173 阅读1分钟
基本配置

URL: xiangmu.com/index.php/index/index

TOKEN:xiaoLou


项目文件代码:

$echoStr = $_GET["echostr"];

$signature = $_GET["signature"];$timestamp = $_GET["timestamp"];

$nonce = $_GET["nonce"];$token = "xiaoLou";

$tmpArr = array($token, $timestamp, $nonce);sort($tmpArr);

$tmpStr = implode( $tmpArr );$tmpStr = sha1( $tmpStr );

if( $tmpStr == $signature ){    return $echoStr;

}else{    return false;

}