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();
        }
    }

发表评论

邮箱地址不会被公开。 必填项已用*标注