hostloc PHP自动签到脚本,更新版本 如果您的论 - Assbbs
hostloc PHP自动签到脚本,更新版本 如果您的论坛昵称里面有中文符号,那请用notepade++编辑php文件,且保存为utf8格式即可。英文昵称可以不用管。 <?php $useList = array  …
hostloc PHP自动签到脚本,更新版本 如果您的论坛昵称里面有中文符号,那请用notepade++编辑php文件,且保存为utf8格式即可。英文昵称可以不用管。 <?php $useList = array & 39;账号1& 39;=>& 39;密码1& 39;, & 39;账号2& 39;=>& 39;密码2& 39;, & 39;账号3& 39;=>& 39;密码3& 39;, ; header "Content-Type: text/html; charset=utf-8" ; foreach $useList as $k=>$v { locSign $k,$v ; } function locSign $use,$pwd { $html = http post & 39;https://www.hostloc.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1& 39;,& 39;fastloginfield=username&username=& 39;.urlencode $use .& 39;&cookietime=2592000&password=& 39;.urlencode $pwd .& 39;&quickforward=yes&handlekey=ls& 39; ; if !strrpos $html,& 39;window.location.href& 39; {echo $use.& 39; login error<br>& 39;;return false;} $cookie = getCookie $html,& 39;Set-Cookie: & 39;,& 39;;& 39; ; for $i=26200; $i<=26210; $i++ { $html = http get "https://www.hostloc.com/space-uid-{$i}.html",$cookie ; } echo $use.& 39; Sign ok!!!<br>& 39;; } function http get $url,$cookie { $ch = curl init $url ; curl setopt $ch, CURLOPT RETURNTRANSFER, 1 ; curl setopt $ch, CURLOPT SSL VERIFYPEER, false ; curl setopt $ch, CURLOPT SSL VERIFYHOST, false ; curl setopt $ch, CURLOPT HTTPHEADER,array & 39;User-Agent: Mozilla/5.0 Windows NT 10.0; WOW64; rv:35.0 Gecko/20100101 Firefox/35.0& 39;,& 39;Referer: https://www.hostloc.com/forum-45-1.html& 39;,& 39;Cookie: & 39;.$cookie ; curl setopt $ch, CURLOPT TIMEOUT, 10 ; $src = curl exec $ch ; curl close $ch ; return $src; } function http post $url,$body { $ch = curl init ; curl setopt $ch, CURLOPT URL,$url ; curl setopt $ch, CURLOPT HEADER, 1 ; curl setopt $ch, CURLOPT SSL VERIFYPEER, false ; curl setopt $ch, CURLOPT SSL VERIFYHOST, false ; …