PageRenderTime 49ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/hosts/depositfiles_com.php

https://github.com/gartz/RapidLeetch
PHP | 51 lines | 42 code | 7 blank | 2 comment | 12 complexity | baf1fdf7932b9ab459406cd69209f8f7 MD5 | raw file
  1. <?php
  2. if (!defined('RAPIDLEECH'))
  3. {
  4. require_once("index.html");
  5. exit;
  6. }
  7. if (preg_match('%^/ru/files/%', $Url["path"]) != 0)
  8. {
  9. $Url["path"] = preg_replace('%^/ru/files/%', '/en/files/', $Url["path"]);
  10. } elseif (preg_match('%^/de/files/%', $Url["path"]) != 0) {
  11. $Url["path"] = preg_replace('%^/de/files/%', '/en/files/', $Url["path"]);
  12. } elseif (preg_match('%^/es/files/%', $Url["path"]) != 0) {
  13. $Url["path"] = preg_replace('%^/es/files/%', '/en/files/', $Url["path"]);
  14. } elseif (preg_match('%^/files/%', $Url["path"]) != 0) {
  15. $Url["path"] = preg_replace('%^/files/%', '/en/files/', $Url["path"]);
  16. }
  17. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"],$pauth);
  18. //file_put_contents("depositfiles_1.txt", $page);
  19. is_page($page);
  20. is_present($page, "Such file does not exist or it has been removed for infringement of copyrights.");
  21. is_present($page, "Your IP is already downloading a file from our system.");
  22. if (stristr($page,'You used up your limit for file downloading!')) {
  23. preg_match('/([0-9]+) minute\(s\)/',$page,$minutes);
  24. html_error("Download limit exceeded. Try again in ".trim($minutes[1])." minute(s)", 0);
  25. }
  26. if (preg_match('/<input type="submit" class="button" value="FREE downloading"/', $page))
  27. {
  28. $post = Array();
  29. $post["gateway_result"] = 1;
  30. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $LINK, 0, $post, 0, $_GET["proxy"],$pauth);
  31. //file_put_contents("depositfiles_2.txt", $page);
  32. is_page($page);
  33. }
  34. preg_match('/<span id="download_waiter_remain">(.*)<\/span>/',$page,$countDown);
  35. $countDown = (int) $countDown[1];
  36. insert_timer($countDown, "The file is being prepared.","",true);
  37. if (preg_match('/<form action="(.*)" method="get" onSubmit="download_started()/U',$page,$dlink)) {
  38. $Url = parse_url(trim($dlink[1]));
  39. $FileName = basename($Url["path"]);
  40. } else {
  41. html_error("Error getting download link", 0);
  42. }
  43. insert_location("$PHP_SELF?filename=".urlencode($FileName)."&host=".$Url["host"]."&path=".urlencode($Url["path"].($Url["query"] ? "?".$Url["query"] : ""))."&referer=".urlencode($LINK)."&email=".($_GET["domail"] ? $_GET["email"] : "")."&partSize=".($_GET["split"] ? $_GET["partSize"] : "")."&method=".$_GET["method"]."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".urlencode($LINK).($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "").($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
  44. ?>