广州凡科互联网科技有限公司

营业时间
MON-SAT 9:00-18:00

全国服务热线
18720358503

公司门店地址
广州市海珠区工业大道北67号凤凰创意园

PHP CURL 自定或是仿冒IP和归路

日期:2021-04-04 浏览:
$ip2id= round(rand(600000, 2550000) / 10000); //第一种方式,立即转化成 $ip3id= round(rand(600000, 2550000) / 10000); $ip4id= round(rand(600000, 2550000) / 10000); //下边是第二种方式,在下列数据信息中任意提取 $arr_1 = array("218","218","66","66","218","218","60","60","202","204","66","66","66","59","61","60","222","221","66","59","60","60","66","218","218","62","63","64","66","66","122","211"); $randarr= mt_rand(0,count($arr_1)-1); $ip1id = $arr_1[$randarr]; return $ip1id.".".$ip2id.".".$ip3id.".".$ip4id; //爬取网页页面內容 function Curl($url){ $ch2 = curl_init(); $user_agent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36";//仿真模拟windows客户一切正常浏览 curl_setopt($ch2, CURLOPT_URL, $url); curl_setopt($ch2, CURLOPT_TIMEOUT, 10); curl_setopt($ch2, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.Rand_IP(), 'CLIENT-IP:'.Rand_IP())); //跟踪回到302情况码,再次爬取 curl_setopt($ch2, CURLOPT_HEADER, true); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch2, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch2, CURLOPT_NOBODY, false); curl_setopt($ch2, CURLOPT_REFERER, '');//仿真模拟归路 curl_setopt($ch2, CURLOPT_USERAGENT, $user_agent); $temp = curl_exec($ch2); curl_close($ch2); return $temp; }


php配置-解决大数据超过1000字段的POST方式提交无法完整接收或者被截取丢失的问题 php配备-处理绝大多数据超出1000字段名的POST方法递交没法详细接受或是被提取遗失的难题
新疆省SEO笑靥的blog共享全新,最合理的新疆省seo营销推广实例教程、seo提升计划方案、seoseo优化,而且出示对各制造行业客户订制要求营销推广、程序制作开发设计,在其中包括的有:后端开发开发设计【PHP,JAVA,C#,.NET】,前端开发开发设计【Html5,JavaScript,css3,vue+react】,android【安卓系统开发设计】,ios【iPhone开发设计】负荷布署,网站安全性检验,程序bug修补等详询::Tel:


新闻资讯

联系方式丨CONTACT

  • 全国热线:18720358503
  • 传真热线:18720358503
  • Q Q咨询:2639601583
  • 企业邮箱:2639601583@qq.com

首页
电话
短信
联系