PageRenderTime 69ms CodeModel.GetById 29ms RepoModel.GetById 1ms app.codeStats 0ms

/hosts/download/freakshare_net.php

https://github.com/gartz/RapidLeetch
PHP | 70 lines | 51 code | 18 blank | 1 comment | 14 complexity | e31731ee77345d8a45db9cd017f0e9f5 MD5 | raw file
  1. <?php
  2. if (!defined('RAPIDLEECH'))
  3. {
  4. require_once("index.html");
  5. exit;
  6. }
  7. $post = Array();
  8. $FileName = !$FileName ? basename($Url["path"]) : $FileName;
  9. $FileName = str_replace(".html", "", $FileName);
  10. if (($_GET["premium_acc"] == "on" && $_GET["premium_user"] && $_GET["premium_pass"])) {
  11. $Url = parse_url("http://freakshare.net/login.html");
  12. $post["user"] = $_GET["premium_user"];
  13. $post["pass"] = $_GET["premium_pass"];
  14. $post["submit"] = "Login";
  15. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, $post, 0, $_GET["proxy"],$pauth);
  16. is_page($page);
  17. $cookie = GetCookies($page);
  18. insert_timer(5, "Please wait while logging in");
  19. $Url = parse_url($LINK);
  20. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, $cookie, 0, 0, $_GET["proxy"],$pauth);
  21. is_page($page);
  22. if (stristr($page, "Location:")) {
  23. $Href = trim(cut_str($page, "Location:","\n"));
  24. $Url = parse_url($Href);
  25. } else {
  26. html_error ("Cannot get download link!", 0 );
  27. }
  28. } else {
  29. $post["section"] = "waitingtime";
  30. $post["did"] = "2";
  31. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, 0, 0, 0, $_GET["proxy"],$pauth);
  32. is_page($page);
  33. $cookie = GetCookies($page);
  34. $countdowntime = trim(cut_str($page, "var time = ",";"));
  35. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cookie, $post, 0, $_GET["proxy"],$pauth);
  36. is_page($page);
  37. if (!stristr($page, "Location:")) {
  38. insert_timer(3, "");
  39. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cookie, $post, 0, $_GET["proxy"],$pauth);
  40. }
  41. if (stristr($page, "Location:")) {
  42. $Href = trim(cut_str($page, "Location:","\n"));
  43. $Url = parse_url($Href);
  44. } else {
  45. html_error ("Cannot get download link!", 0 );
  46. }
  47. $cookie .= "; " . GetCookies($page);
  48. insert_timer($countdowntime, "Please wait while getting file.");
  49. }
  50. insert_location("$PHP_SELF?filename=".urlencode($FileName)."&host=".$Url["host"]."&port=".$Url["port"]."&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"]) : "")."&auth=".$auth.($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
  51. // by plapla on Nov 25, 2009
  52. ?>