官网文档 https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html
php 示例代码
public function index()
{
$signature = $_GET["signature"];
$timestamp = $_GET["timestamp"];
$nonce = $_GET["nonce"];
$token = 'token';
$tmpArr = array($token, $timestamp, $nonce);
sort($tmpArr, SORT_STRING);
$tmpStr = implode( $tmpArr );
$tmpStr = sha1( $tmpStr );
if( $tmpStr == $signature ){
echo $_GET['echostr']; //注意这一点 不是返回true
exit;
}else{
echo false;
}
}
标签:nonce,GET,微信,tmpArr,signature,认证,公众,timestamp,tmpStr
From: https://www.cnblogs.com/lijiaxiang/p/17109679.html