HostLoc论坛自动签到脚本
2025年01月16日 05:54:47

LIKE.TG | 发现全球营销软件&服务汇聚顶尖互联网营销和AI营销产品,提供一站式出海营销解决方案。唯一官网:www.like.tg
记录一下省的下回找不到.
<?php
$lines = file(dirname(__FILE__).'/list.txt');
foreach($lines as $line){
list($username, $password) = explode('#', $line);
$username = trim($username);
$password = trim($password);
if(empty($username) || empty($password)){
continue;
}
$suburl = "https://www.hostloc.com/member.php?mod=logging&action=login";
$loginInfo = array(
"fastloginfield" => "username",
"username" => $username,
"password" => $password,
"quickforward" => "yes",
"handlekey" => "ls",
"loginsubmit" => true
);
echo "login($username) ... ";
$login = curl_post($suburl,$loginInfo);
if(strpos($login, $username) !== FALSE){
preg_match("/>用户组: (.*?)<\/a>/", $login, $preg);
$group = $preg[1];
echo "Success!($group)\n";
}else{
echo "Failed!\n\n";
continue;
}
extract(get_jf());
echo "Credit: $credit; Money: $money\n";
echo "Visting user space ";
for($i=0;$i<20;$i++){
$uid = mt_rand(10000,20000);
curl_get('https://www.hostloc.com/space-uid-'.$uid.'.html');
sleep(1);
echo ".";
}
echo " done!\n";
extract(get_jf());
echo "Credit: $credit; Money: $money\n\n";
}
function get_jf(){
$data = array();
$html = curl_get("https://www.hostloc.com/home.php?mod=spacecp&ac=credit&op=base");
preg_match("/积分: (\d+)<\/a>/", $html, $preg);
if(!empty($preg[1])){
$data['credit'] = $preg[1];
}else{
$data['credit'] = 0;
}
preg_match("/金钱: <\/em>(\d+)/", $html, $preg);
if(!empty($preg[1])){
$data['money'] = $preg[1];
}else{
$data['money'] = 0;
}
return $data;
}
function curl_post($url, $post_data){
$ch = curl_init ();
curl_setopt($ch, CURLOPT_POST , 1);
curl_setopt($ch, CURLOPT_HEADER , 0);
curl_setopt($ch, CURLOPT_URL , $url);
curl_setopt($ch, CURLOPT_COOKIEJAR , '/tmp/hostloc.cookie');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.rand_ip()));
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible;Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)');
curl_setopt($ch, CURLOPT_POSTFIELDS , $post_data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_TIMEOUT,6000);
curl_setopt($ch, CURLOPT_REFERER, 'https://www.hostloc.com/');
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
function curl_get($url){
$ch = curl_init ();
curl_setopt($ch, CURLOPT_HEADER , 0);
curl_setopt($ch, CURLOPT_URL , $url);
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/hostloc.cookie');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.rand_ip()));
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible;Baiduspider-render/2.0; +http://www.baidu.com/search/spider.html)');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT,6000);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
function rand_ip(){
return rand(1,255).'.'.rand(1,255).'.'.rand(1,255).'.'.rand(1,255);
}
另存为 loc.php
新建一个 list.txt
格式为:
账号#密码
账号#密码....

LIKE.TG:汇集全球营销软件&服务,助力出海企业营销增长。提供最新的“私域营销获客”“跨境电商”“全球客服”“金融支持”“web3”等一手资讯新闻。
点击【联系客服】 🎁 免费领 1G 住宅代理IP/proxy, 即刻体验 WhatsApp、LINE、Telegram、Twitter、ZALO、Instagram、signal等获客系统,社媒账号购买 & 粉丝引流自助服务或关注【LIKE.TG出海指南频道】、【LIKE.TG生态链-全球资源互联社区】连接全球出海营销资源。
本文由LIKE.TG编辑部转载自互联网并编辑,如有侵权影响,请联系官方客服,将为您妥善处理。
This article is republished from public internet and edited by the LIKE.TG editorial department. If there is any infringement, please contact our official customer service for proper handling.
Server deployment全球论坛人工智能论坛全球峰会发展论坛战略论坛开放论坛程序员论坛互联网峰会科技峰会