$token = 'wxtoken';//1HM81QCkehYncv0cph337Dp3PYHA05lDRu43P2vWDxM
$signature = $_GET["signature"];
$timestamp = $_GET["timestamp"];
$nonce = $_GET["nonce"];
$echostr = $_GET['echostr'];
$array = array($token, $timestamp, $nonce);
sort($array);
$arrayStr = implode($array);
$arrayStr = sha1($arrayStr);
if ($signature == $arrayStr) {
$file= fopen('weixin.txt', 'w');
fclose($file);
echo $echostr;
} else {
return false;
}
exit();
公众号消息推送
©
著作权归作者所有,转载或内容合作请联系作者