标签:
1 function getHTML($url){ 2 $ch = curl_init(); //1.初始化curl 3 curl_setopt($ch,CURLOPT_URL, $url); //2.curl配置 4 curl_setopt($ch,CURLOPT_HEADER,FALSE); 5 curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); 6 $html = curl_exec($ch); //3.获取流 7 curl_close($ch); //4.关闭curl 8 return $html; 9 }
标签:
原文地址:http://www.cnblogs.com/Skrillex/p/5509548.html