Witam mam problem następujący nie wiem czego ale nie działa mi sprawdzanie kont premium rapidshare jest połączenie ale nie pokazuje mi danych np.Kiedy wygaśnie, ile pozostało do pobrania itp
O to jak to działa: Napisałem swój panel na który dodaje konta czyli -->dodaje na baze sql–>potem sprawdzam status kont ale wyświetla mi unknown (nieznany)
– Dodane 21.02.2009 (So) 2:13 –
Może przy użyciu preg_match lub preg_match_all ? A zapomniałem powiedzieć że ten skrypt pisany z 1,5roku temu trzeba go przerobić żeby działał z nowym rapidshare (wyciągał dane ile pozostało trafficu itp)
$curl = curl_init();
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_COOKIE, "user=$cook");
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($curl, CURLOPT_URL, "https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi");
$xxx = curl_exec($curl);
$check1 = explode('if (1)',$xxx);
if (isset($check1[1])) {
return "expired";
;
}
$check2 = explode("Account has been found, but the password is incorrect",$xxx);
if(isset($check2[1])){
return "incorrect";
}
$check3 = explode("Fraud Detected",$xxx);
if(isset($check3[1])){
return "fraud";
}
$check3 = explode('Expiration date: ',$xxx);
if (isset($check3[1])) {
$validuntil = substr($check3[1],0,17);
}
$check4 = explode("RapidPoints",$xxx);
if (isset($check4[1])) {
$points = get_value_from_code('RapidPoints:','', $xxx);
}
//die("expired");
$myarr = explode('5 days Traffic:',$xxx);
if (isset($myarr[1])) {
$mybw = explode (".",$myarr[1]);
$tbw = round(($mybw[0] / 1000),1);
if ($tbw>=50) {
return "bandwidth ($validuntil) - $points";
}
return "$tbw ($validuntil) - $points";
} else {
//$this->disable($cook,'true');
return "unknown";
}[/code]
Znalazłem podobny w necie do mojego tylko proszę powiedzieć co zmienić
[code]<?php if (isset ($_POST[‘accounts’])) { set_time_limit(0); $dtaaccounts = nl2br($dtaaccounts); $dtaaccounts = explode("\n", $_POST[‘accounts’]); //Header echo "
Użytkownik | Hasło | Punkty | Traffic | Ważność | Zabezpieczenie |
---|
([0-9.]+)", $pagedata, $points); ereg(“Expiration date:([a-zA-Z_0-9\ .,]+)”, $pagedata, $valid); ereg(“schlosszu = “([0-9])””, $pagedata, $slock); $pattern = “var email = “([a-zA-Z0-9._-]+@[a-zA-Z0-9-]+.[a-zA-Z.]{2,5})””; ereg($pattern,$pagedata, $email); if($slock[1]==“1”){ $slocktext = “active”; }else{ $slocktext = “inactive”; }; //display if valid if(empty($valid[1])==FALSE){ echo “”."$User"."$Pass"."$email[1]"."$points[1]"."$traffic[1] Mb"."$valid[1]"."$slocktext".""; $validrs[] = $User . “:” . $Pass . “:” . $email[1] . “:” . $points[1] . “:” . $traffic[1] . “:” . $valid[1] . “:” . $slocktext; } unset($valid); } } if (isset($validrs)) { echo "Formatted Output: "; foreach ($validrs as &$value) { echo $value . “\n”; } echo “”;} }