function index()
{
/*ob_clean();*/
$timestamp = $_GET['timestamp'];
$nonce =$_GET['nonce'];
$token = 'weixin';
$signature = $_GET['signature'];
$array = [$timestamp, $nonce, $token];
sort($array);
$tmp = implode('', $array);
$tmp = sha1($tmp);
if ($tmp == $signature && $_GET['echostr']) {
echo $_GET['echostr'];
exit;
} else {
response();
}
} |
function index()
{
/*ob_clean();*/
$timestamp = $_GET['timestamp'];
$nonce =$_GET['nonce'];
$token = 'weixin';
$signature = $_GET['signature'];
$array = [$timestamp, $nonce, $token];
sort($array);
$tmp = implode('', $array);
$tmp = sha1($tmp);
if ($tmp == $signature && $_GET['echostr']) {
echo $_GET['echostr'];
exit;
} else {
response();
}
}