function getHTML($url){ $ch = curl_init(); //1.初始化curl curl_setopt($ch,CURLOPT_URL, $url); //2.curl配置 curl_setopt($ch,CURLOPT_HEADER,FALSE); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $html = curl_exec($ch); //3.获取流 curl_close($ch); //4.关闭curl return