http://513394217.blog.163.com/blog/static/10979118620125733237998/
阅读(714) | 评论(0) | 转发(1) |
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
curl命令
-------------------
给某个网址POST数据:
在curl里添加代理IP:
如果我们要投票的网站只是检测代理IP,那么,上述命令就能自动投票了。我们用PHP脚本,去某些代理网站抓取代理IP和端口,然后用exec调用拼凑好的命令。
- /*------------获取proxy--------------*/
- $urlList = array(
- //'http://www.sooip.cn/Article_Show.asp?ArticleID=2141',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3961',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3959',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3956',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3951',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3948',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3946',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3944',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3939',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3933',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3909',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3907',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3904',
- 'http://www.sooip.cn/Article_Show.asp?ArticleID=3900'
- );
- $result = array();
- foreach($urlList as $url) {
- echo "\nParsing web page: {$url}";
- $tmpHtml = file_get_contents($url);
- preg_match_all("/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s+(\d{1,4})\s+HTTP/i", $tmpHtml, $matches);
- for ($i=0; $i< count($matches[0]); $i++) {
- $result[] = $matches[1][$i] . ":" . $matches[2][$i];
- }
- }
- echo "\nParse excuted successfully!";
- /*------------逐个投票--------------*/
- echo "\n\n\nStart to vote:";
- $i = 1;
- $proxyList = $result;
- while(!empt y($proxyList)) {
- //empty多了个空格
- $proxy = array_shift($proxyList);
- echo "\n\nNo.{$i}\n";
- //暂停,控制投票频率
- $pauseSeconds = rand(10, 30);
- echo "pausing: {$pauseSeconds} s\n";
- sleep($pauseSeconds);
- //执行投票
- echo "vote from: {$proxy} \n";
- echo "----------------------\n";
- exec('curl -x ' . $proxy . ' -d "id=1234" http://www.example.net/VoteAction.php');
- $i++;
- }
- echo "\ndone!";
相关热门文章
给主人留下些什么吧!~~
评论热议