大力出逗比

非常简单的刷hostloc积分代码 纯js不需要jquery
刷hostloc积分代码
扫描右侧二维码阅读全文
08
2017/12

非常简单的刷hostloc积分代码 纯js不需要jquery

刷hostloc积分代码

<meta charset="UTF-8">
<script language="javascript">
for(var i=0;i<=10;i++){
    var link=document.createElement("img");
    link.href="http://www.hostloc.com/space-uid-"+Math.floor(10000 + Math.random() * (24000 - 10000))+".html";
    document.head.appendChild(link);
}
  alert("刷分完毕");
</script>
<head/>
<?php

function login_post($url, $cookie, $post) {
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HEADER, 0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 0);
    curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
    curl_exec($curl);
    curl_close($curl);
}
function get_content($url, $cookie) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
    $rs = curl_exec($ch);
    curl_close($ch);
    return $rs;
}
$user = array( 'zhanghao','zhanghao');
$pwd = array('mima', 'mima');
for ($i = 0; $i < count($user); $i++) {
  echo $i;
    $post = array(
        'mod' => 'logging',
        'action' => 'login',
        'loginsubmit' => 'yes',
        'infloat' => 'yes',
        'lssubmit' => 'yes',
        'username' => $user[$i],
        'password' => $pwd[$i]
    );
    $url = "http://www.hostloc.com/member.php";
    $cookie = dirname(__FILE__) . '/cookie_lochost.txt';
    login_post($url, $cookie, $post);
    for ($i = 0; $i <= 12; $i++) {
        $url2 = "http://www.hostloc.com/space-uid-" . rand(10000, 24000) . ".html";
        $content = get_content($url2, $cookie);
        //echo $content;
    }
     $preg = '{<a\b[^>]+\bhref="([^"]*)"[^>]*>退出</a>}';
     preg_match_all($preg, $content, $arr);
     //test
     echo $arr[1][0];
  echo 'http://www.hostloc.com/' . $arr[1][0];
     $content = get_content('http://www.hostloc.com/' . $arr[1][0], $cookie);
  echo $content;
     @unlink($cookie);
}
?>
Last modification:August 10th, 2018 at 02:43 pm
If you think my article is useful to you, please feel free to appreciate

One comment

  1. 沙扬娜拉

    学习了,

Leave a Comment