剑毒梅香txt,林美贞透明泳装,一辉复古传奇
最基本的操作如下
$curlpost = 'a=1&b=2';//模拟post数据
$ch = curl_init();
curl_setopt($ch, curlopt_httpheader, array('x-forwarded-for:0.0.0.0', 'client-ip:0.0.0.0')); //构造ip
curl_setopt($ch, curlopt_referer, "//www.jb51.net/"); //构造来路
curl_setopt($ch,curlopt_url, '//www.jb51.net');//需要抓取的页面路径
curl_setopt ($ch, curlopt_returntransfer, 1);
curl_setopt ($ch, curlopt_timeout, 30);
curl_setopt($ch, curlopt_postfields, $curlpost);//post值
$file_contents = curl_exec($ch);//抓取的内容放在变量中
curl_close($ch)
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!!
点击进行留言回复
网友评论