PHP爬取某会员分享网站源码分享

访客4年前黑客文章918

代码分享,这个是网站提供的三种会员,每个ip每天只能获取三次 所以换个ip就可以无限查看了 获取页面如下(图省事,就简单的输出了下)   

思路很好,思源补注释,仅供学习参考 

<?php
function get_psd($id)//伪造ip获取密码
{
    $ip = rand(1, 254) . '.' . rand(1, 254) . '.' . rand(1, 254) . '.' . rand(1, 254);
    $mainurl = 'http://www.zhanghao.cc/index.php?c=main&a=getpass&id=' . $id;
    $opts = array('http' => array('header' => 'X-Forwarded-For:' . $ip . ''));
    $context = stream_context_create($opts);
    $contents = file_get_contents($mainurl, false, $context);
    //echo $contents;
    exit($contents);
}
$id = $_GET['id'];//截取id
if ($id != "") {
    get_psd($id);
}
$ip = rand(1, 254) . '.' . rand(1, 254) . '.' . rand(1, 254) . '.' . rand(1, 254);
$url = 'http://www.zhanghao.cc/';
$opts = array('http' => array('header' => 'Cookie:' . @$cookie . ''));
$context = stream_context_create($opts);
$contents = file_get_contents($url, false, $context);//此处可以用curl提高速度
//正则表达式
preg_match_all('/class="a30b-01fd-9af9-abb9 table1">(.*?)name="aqy">[\\s|\\S]*?class="01fd-9af9-abb9-44f8 table1">(.*?)name="yk">[\\s|\\S]*?class="9af9-abb9-44f8-64ed table1">(.*?)"w300 b kr"/', $contents, $match);
preg_match_all('/<font color="red">(.*?)<\\/font[\\s|\\S]*?id="(.*?)" class/', $match[1][0], $xunl);
preg_match_all('/<font color="red">(.*?)<\\/font[\\s|\\S]*?id="(.*?)" class/', $match[2][0], $aiqy);
preg_match_all('/<font color="red">(.*?)<\\/font[\\s|\\S]*?id="(.*?)" class/', $match[3][0], $you);
//echo $match[1][0];
echo "迅雷会员:<br>";
for ($i = 0; $i < count($xunl[1]); $i = $i + 1) {
    echo '账号:' . $xunl[1][$i] . '        id:' . $xunl[2][$i] . '<a href="/zh/?id=' . $xunl[2][$i] . '">点我查看密码</a>' . "<br>";
}
echo "爱奇艺:<br>";
for ($i = 0; $i < count($aiqy[1]); $i = $i + 1) {
    echo '账号:' . $aiqy[1][$i] . '        id:' . $aiqy[2][$i] . '<a href="/zh/?id=' . $aiqy[2][$i] . '">点我查看密码</a>' . "<br>";
}
echo "优酷:<br>";
for ($i = 0; $i < count($you[1]); $i = $i + 1) {
    echo '账号:' . $you[1][$i] . '        id:' . $you[2][$i] . '<a href="/zh/?id=' . $you[2][$i] . '">点我查看密码</a>' . "<br>";
}

美化版本下载:VIP会员帐号获取.zip

标签: PHP实例

相关文章

微信域名拦截安全检测API PHP源码

微信域名安全检测API PHP源码 感谢蓝优提供源码 这是一个很简单操作,利用跳转检测是否和域名一致。调用:域名/api.php?url= <?php /** --------...

京东图床api接口源码

<?php header("Content-type:text/html;charset=utf-8"); //jkch.net if (class_exists('CURLFile')) { ...

php js 实例分享实现显示网站运行时间 - 显示年月日时分秒

分享两个版本的网站运行时间代码  PHP版本 显示为 本站运行:3年9月10天 <?php date_default_timezone_set('Asia/Shanghai')...

php代码分享防止刷流量攻击

<?php //查询禁止IP $ip =$_SERVER['REMOTE_ADDR']; $fileht=".htaccess2"; if(!file_exists($fileht))file_...

思源工具箱抖音api解析接口更新

<?php header('Access-Control-Allow-Origin:*'); header('Content-Type:text/json;charset=utf8'); /*...

实战PHP皮皮虾无水印解析接口

目标接口:https://h5.pipix.com/bds/webapi/item/detail/?item_id= id根据301跳转后截取item/ 和?中间的值 curl模拟设备获取数据 然...