background image

=> 'Request Entity Too Large',
=> 'Request-URI Too Long',
=> 'Unsupported Media Type',
=> 'Requested Range Not Satisfiable',
=> 'Expectation Failed',
        // Server Error 5xx
=> 'Internal Server Error',
=> 'Not Implemented',
=> 'Bad Gateway',
=> 'Service Unavailable',
=> 'Gateway Timeout',
=> 'HTTP Version Not Supported',
=> 'Bandwidth Limit Exceeded'
        );
        if(array_key_exists($code,$_status)) {
            header('HTTP/1.1 '.$code.' '.$_status[$code]);
        }
    }
    function GetStatusCode($url)
    {
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $url); //设置 URL

        curl_setopt($curl, CURLOPT_HEADER, 1); //获取 Header
        curl_setopt($curl,CURLOPT_NOBODY,true); //Body 就不要了吧,我们只是需要 Head
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); //数据存到成字符串吧,别给我
直接输出到屏幕了
        $data = curl_exec($curl); //开始执行啦~
        $HttpCode =curl_getinfo($curl,CURLINFO_HTTP_CODE); //我知道 HTTPSTAT 码
        curl_close($curl); //用完记得关掉他
        return $HttpCode;
    }
    function ResetUrl($url)
    {
        if(strpos($url,"?")>0)
            $url.="&rnd";
        else
            $url.="?rnd";
        $url.=rand();
        return $url;
    }
    function ShowStateInfo($UrlArr,$MailPara)
    {
        $count=count($UrlArr);