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
Moge udustępnić na chwile konto premium żeby osoba mogła zobaczyć może by wykombinowała żeby sprawdzanie kont działało
Cytat
$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:</td><td style="padding-right:20px;"><b> ',$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:</td><td style="padding-right:20px;"><b>','</b></td>', $xxx);
}
//die("expired");
$myarr = explode('5 days Traffic:</td><td align=right style="padding-right:20px;"><b>',$xxx);
if (isset($myarr[1])) {
$mybw = explode ("</b>.</p>",$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";
}
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:</td><td style="padding-right:20px;"><b> ',$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:</td><td style="padding-right:20px;"><b>','</b></td>', $xxx);
}
//die("expired");
$myarr = explode('5 days Traffic:</td><td align=right style="padding-right:20px;"><b>',$xxx);
if (isset($myarr[1])) {
$mybw = explode ("</b>.</p>",$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";
}
Znalazłem podobny w necie do mojego
Cytat
<?php
if (isset ($_POST['accounts'])) {
set_time_limit(0);
$dtaaccounts = nl2br($dtaaccounts);
$dtaaccounts = explode("\n", $_POST['accounts']);
//Header
echo "<table font-size=1 width=\"50%\" border=1 cellspacing=\"0\" cellpadding=\"7\">".
"<tr><th>Użytkownik</th><th>Hasło</th><th>Email</th><th>Punkty</th><th>Traffic</th><th>Ważność</th><th>Zabezpieczenie</th></tr>";
foreach ($dtaaccounts as &$value) {
list($User, $Pass) = split(":", $value);
if (empty($User)==FALSE || empty($Pass)==FALSE){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
//set proxy here
//curl_setopt($ch, CURLOPT_PROXY, 'http://127.0.0.1:8080');
//curl_setopt($ch, CURLOPT_PROXYPORT, 8080);
//curl_setopt ($ch, CURLOPT_PROXYUSERPWD, '');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "login=".$User."&password=".$Pass);
$pagedata = curl_exec($ch);
curl_close($ch);
//get rapidshare details
ereg("Math.ceil\(([0-9]+)/", $pagedata, $traffic);
$traffic[1] = $traffic[1] / 1000;
ereg("<td>RapidPoints:</td><td align=right style=\"padding-right:20px;\"><b>([0-9\.]+)</b>", $pagedata, $points);
ereg("<td>Expiration date:</td><td style=\"padding-right:20px;\"><b>([a-zA-Z\_0-9\ .,]+)</b>", $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 "<tr>"."<td>$User</td>"."<td>$Pass</td>"."<td>$email[1]</td>"."<td>$points[1]</td>"."<td>$traffic[1] Mb</td>"."<td>$valid[1]</td>"."<td>$slocktext</td>"."</tr>";
$validrs[] = $User . ":" . $Pass . ":" . $email[1] . ":" . $points[1] . ":" . $traffic[1] . ":" . $valid[1] . ":" . $slocktext;
}
unset($valid);
}
}
if (isset($validrs)) {
echo "</table>Formatted Output:<p><textarea rows=\"1\" cols=\"1\" style=\"width: 50%; height: 140px\">";
foreach ($validrs as &$value) {
echo $value . "\n";
}
echo "</textarea>";}
}
if (isset ($_POST['accounts'])) {
set_time_limit(0);
$dtaaccounts = nl2br($dtaaccounts);
$dtaaccounts = explode("\n", $_POST['accounts']);
//Header
echo "<table font-size=1 width=\"50%\" border=1 cellspacing=\"0\" cellpadding=\"7\">".
"<tr><th>Użytkownik</th><th>Hasło</th><th>Email</th><th>Punkty</th><th>Traffic</th><th>Ważność</th><th>Zabezpieczenie</th></tr>";
foreach ($dtaaccounts as &$value) {
list($User, $Pass) = split(":", $value);
if (empty($User)==FALSE || empty($Pass)==FALSE){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
//set proxy here
//curl_setopt($ch, CURLOPT_PROXY, 'http://127.0.0.1:8080');
//curl_setopt($ch, CURLOPT_PROXYPORT, 8080);
//curl_setopt ($ch, CURLOPT_PROXYUSERPWD, '');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "login=".$User."&password=".$Pass);
$pagedata = curl_exec($ch);
curl_close($ch);
//get rapidshare details
ereg("Math.ceil\(([0-9]+)/", $pagedata, $traffic);
$traffic[1] = $traffic[1] / 1000;
ereg("<td>RapidPoints:</td><td align=right style=\"padding-right:20px;\"><b>([0-9\.]+)</b>", $pagedata, $points);
ereg("<td>Expiration date:</td><td style=\"padding-right:20px;\"><b>([a-zA-Z\_0-9\ .,]+)</b>", $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 "<tr>"."<td>$User</td>"."<td>$Pass</td>"."<td>$email[1]</td>"."<td>$points[1]</td>"."<td>$traffic[1] Mb</td>"."<td>$valid[1]</td>"."<td>$slocktext</td>"."</tr>";
$validrs[] = $User . ":" . $Pass . ":" . $email[1] . ":" . $points[1] . ":" . $traffic[1] . ":" . $valid[1] . ":" . $slocktext;
}
unset($valid);
}
}
if (isset($validrs)) {
echo "</table>Formatted Output:<p><textarea rows=\"1\" cols=\"1\" style=\"width: 50%; height: 140px\">";
foreach ($validrs as &$value) {
echo $value . "\n";
}
echo "</textarea>";}
}