网址导航php访问量
就是我在某个网址导航网站上面申请了友情链接,然后如果从我网站同个那个网址进入对方网站,我的网站就会显示在对方的首页,
然后我想我的网站一直显示在对方网站的首页,我就想到了刷ip访问量,,就会让我的网站一直显示在对方首页,,,如截图所示。。
我写了一段php代码。。。但是刷不成功。。一个ip也没成功,求解。。
原谅我没有c币,拜托求解。。。。
<code> <?php $header = array( 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', ); $url="http://icsr.cn/a.asp?icecms"; $cookie_file = dirname(__FILE__)."/cookie.txt"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Linux; U; Android 4.4.5; zh-CN; MI 3W Build/KTU84P) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/10.8.0.654 U3/0.8.0 Mobile Safari/534.30'); curl_setopt($ch, CURLOPT_REFERER, "http://icecms.cn"); //伪装REFERER curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate,sdch'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file); curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); //代理认证模式 curl_setopt($ch, CURLOPT_PROXY, "203.195.162.96"); //代理服务器地址 curl_setopt($ch, CURLOPT_PROXYPORT, 80); //代理服务器端口 curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); //使用http代理模式 $body=curl_exec($ch); curl_close($ch); $inarr = array(); $inarr1 = array(); preg_match('/url=(.*)"/isU',$body,$inarr); preg_match('/2-(.*)\./isU',$body,$inarr1); //以上是获取首次访问的COOKIE和跳转的链接 //$ch = curl_init("http://tool.yswl.pw/ua"); //带上首次访问得到的cookie访问跳转的链接 echo $tourl="http://icsr.cn/toin.asp?id=791&rid={$inarr1[1]}"; $ch = curl_init($tourl); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Linux; U; Android 4.4.5; zh-CN; MI 3W Build/KTU84P) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/10.8.0.654 U3/0.8.0 Mobile Safari/534.30'); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate,sdch'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_REFERER, $url); //伪装REFERER curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file); curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); //代理认证模式 curl_setopt($ch, CURLOPT_PROXY, "203.195.162.96"); //代理服务器地址 curl_setopt($ch, CURLOPT_PROXYPORT, 80); //代理服务器端口 //curl_setopt($ch, CURLOPT_PROXYUSERPWD, ":"); //http代理认证帐号,username:password的格式 curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); //使用http代理模式 $contents = curl_exec($ch); curl_close($ch);// $fp = @fopen("Log.html", "w"); //记录捕获到的页面源码// fwrite($fp,$contents);// fclose($fp); //带上首次访问得到的cookie访问跳转的链接 echo $send_url=$inarr[1]; $ch = curl_init($send_url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Linux; U; Android 4.4.5; zh-CN; MI 3W Build/KTU84P) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/10.8.0.654 U3/0.8.0 Mobile Safari/534.30'); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate,sdch'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_REFERER, $url); //伪装REFERER curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file); curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); //代理认证模式 curl_setopt($ch, CURLOPT_PROXY, "203.195.162.96"); //代理服务器地址 curl_setopt($ch, CURLOPT_PROXYPORT, 80); //代理服务器端口 //curl_setopt($ch, CURLOPT_PROXYUSERPWD, ":"); //http代理认证帐号,username:password的格式 curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); //使用http代理模式 $contents = curl_exec($ch); curl_close($ch); //最后再访问首页 $ch = curl_init("http://icsr.cn"); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Linux; U; Android 4.4.5; zh-CN; MI 3W Build/KTU84P) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/10.8.0.654 U3/0.8.0 Mobile Safari/534.30'); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_REFERER, $send_url); //伪装REFERER curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file); curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); //代理认证模式 curl_setopt($ch, CURLOPT_PROXY, "203.195.162.96"); //代理服务器地址 curl_setopt($ch, CURLOPT_PROXYPORT, 80); //代理服务器端口 //curl_setopt($ch, CURLOPT_PROXYUSERPWD, ":"); //http代理认证帐号,username:password的格式 curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); //使用http代理模式echo $contents = curl_exec($ch); curl_close($ch);?></code>