标签:php curl
static function Curl($url, $preg) {
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url); //url 连接
curl_setopt($curl, CURLOPT_HEADER, false); //返回都头信息
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); //以文本模式输出
$data = curl_exec($curl); //远程获取到的内容
preg_match_all($preg, $data, $conent); //正则匹配
return $conent;
}
标签:php curl
原文地址:http://jinliang.blog.51cto.com/8981814/1573822