Добавлена поддержка нескольких акков - теперь нагрузка распределяется равномерно. В связи с этим лимит смягчен до 300Мб
Он поулчил это заслужено.IRC маэстро
не спорю, что легкоДа там легко,я его за 15 минут написал wink.gif но не дам ибо жадный thumbsup.gif
<?php
$flink = "http://rapidshare.de/files/15947446/Necro_-_Gory_Days.rar.html";
#
$fileid = substr($flink ,strpos($flink,"files/")+6);
$fileid = substr($fileid,0,strpos($fileid,"/"));
$filelink = substr($flink,strpos($flink,"de")+2);
$filename = substr($filelink,strpos($filelink,$fileid)+strlen($fileid)+1);
#
$fsock = fsockopen("rapidshare.de",80,$errnum,$errstr,2);
if (!$fsock) die ($errstr);
else
{
#
$params = "premiumlogin=1&fileid=".$fileid."&filename=".$filename."&accountid=&password=";
$request = "POST /cgi-bin/premium.cgi HTTP/1.1\n";
$request .= "Host: rapidshare.de\n";
$request .= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2\n";
$request .= "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\n";
$request .= "Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3\n";
$request .= "Accept-Encoding: gzip,deflate\n";
$request .= "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7\n";
$request .= "Keep-Alive: 300\n";
$request .= "Connection: keep-alive\n";
$request .= "Referer: rapidshare.de\n";
$request .= "Content-Type: application/x-www-form-urlencoded\n";
$request .= "Content-Length: ".strlen($params)."\r\n\r\n";
$request .= $params;
#
fwrite ($fsock,$request);
while (!feof($fsock)) $responce .= fread($fsock,1024);
fclose($fsock);
#
if (strpos($responce,"word is incorrect")) die("Account found, but password is incorrect");
if (strpos($responce,"Account not found")) die("Premium-Account not found.");
if (strpos($responce,"User-ID invalid.")) die("User-ID invalid.");
#
if (strpos($responce,"Cookie set."))
{
$fsock = fsockopen("rapidshare.de",80,$errnum,$errstr,2);
#
$cookie = substr($responce,strpos($responce,"Set-Cookie:")+11);
$cookie = substr($cookie,0,strpos($cookie,";"));
#
$params = "l=&p=&dl.start=Download+".$filename;
$request = "POST ".$filelink." HTTP/1.1\n";
$request .= "Host: rapidshare.de\n";
$request .= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2\n";
$request .= "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\n";
$request .= "Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3\n";
$request .= "Accept-Encoding: gzip,deflate\n";
$request .= "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7\n";
$request .= "Keep-Alive: 300\n";
$request .= "Cookie: ".$cookie."\n";
$request .= "Connection: keep-alive\n";
$request .= "Referer: rapidshare.de\n";
$request .= "Content-Type: application/x-www-form-urlencoded\n";
$request .= "Content-Length: ".strlen($params)."\r\n\r\n";
$request .= $params;
#
fwrite ($fsock,$request);
while (!feof($fsock)) $responce .= fread($fsock,1024);
fclose($fsock);
#
$downlink = (substr($responce,strpos($responce,"for you.</p><p>")+15,strpos($responce,"</p><p>")+7));
die ($downlink);
}
}
?>
Я думаю, того скрипта что дал gemaglabin вполне достаточно.я подумаю насчет раскрытия сорца. А что скажет соавтор скрипта DeusTirael?
Скачать|DownloadПо просьбам трудящихся - сорцы скрипта IP Information (http://xss.pro/ip.php):
Скачать|Download