PageRenderTime 78ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/hosts/upload/netload.in_premium.php

http://rapidleech.googlecode.com/
PHP | 129 lines | 112 code | 10 blank | 7 comment | 11 complexity | 4f25125802d2b6046fc88c4a86c0228b MD5 | raw file
  1. <?php
  2. ##########################################
  3. $mega_login = ""; // login
  4. $mega_pass = ""; // password
  5. ##########################################
  6. $not_done = true;
  7. $continue_up = false;
  8. $cook = "";
  9. if ($mega_login & $mega_pass) {
  10. $_REQUEST ['my_login'] = $mega_login;
  11. $_REQUEST ['my_pass'] = $mega_pass;
  12. $_REQUEST ['action'] = "FORM";
  13. echo "<b><center>Use Default Netload.in login/pass.</center></b>\n";
  14. }
  15. if ($_REQUEST ['action'] == "FORM")
  16. $continue_up = true; else {
  17. ?>
  18. <table border=1 style="width: 540px;" cellspacing=0 align=center>
  19. <form method=post><input type=hidden name=action value='FORM' />
  20. <tr >
  21. <td colspan=4 align=center height=25px ><b>Enter Premium Account</b> </td>
  22. </tr>
  23. <tr>
  24. <td nowrap>&nbsp;Login
  25. <td>&nbsp;<input name=my_login value='' style="width: 160px;" />&nbsp;
  26. <td nowrap>&nbsp;Password
  27. <td>&nbsp;<input type=password name=my_pass value='' style="width: 160px;" />&nbsp;
  28. </tr>
  29. <tr>
  30. <td nowrap colspan=0>&nbsp;Description
  31. <td colspan=3>&nbsp;<input name=message value='<?php print $mega_desc; ?>' style="width: 428px;" />&nbsp;
  32. </tr>
  33. <tr><td colspan=4 align=center><input type=submit value='Upload' /></tr>
  34. </table>
  35. </form>
  36. <?php
  37. }
  38. if ($continue_up) {
  39. $lang = "l=en"; // ?????????? ????
  40. $not_done = false;
  41. if (empty ( $_REQUEST ['my_login'] ) || empty ( $_REQUEST ['my_pass'] )) {
  42. echo "<b><center>Empty login/pass Netload.in.</center></b>\n";
  43. $mem = false;
  44. } else {
  45. ?>
  46. <div id=login width=100% align=center>Login to Netload.in</div>
  47. <?php
  48. $mem = true;
  49. $Url = parse_url("http://netload.in/index.php");
  50. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, "/index.php", "http://netload.in/index.php", 0, 0, 0, $_GET["proxy"],$pauth);
  51. preg_match_all('/Set-Cookie: (.*);/U',$page,$temp);
  52. $cookie = $temp[1];
  53. $cook = implode(';',$cookie);
  54. $post = array();
  55. $post["txtuser"] = $_REQUEST ['my_login'] ? $_REQUEST ['my_login'] : $premium_acc["netload"]["user"];
  56. $post["txtpass"] = $_REQUEST ['my_pass'] ? $_REQUEST ['my_pass'] : $premium_acc["netload"]["pass"];
  57. $post["txtcheck"] = "login";
  58. $post['txtlogin'] = '';
  59. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, "/index.php", "http://netload.in/index.php", $cook, $post, 0, $_GET["proxy"],$pauth);
  60. is_page ( $page );
  61. //print_r($page);
  62. if (strpos ( $page, "we couldnt find user" )) {
  63. echo "<b><center>Error login to Netload.in.</center></b>\n";
  64. } else {
  65. preg_match_all('/Set-Cookie: (.*);/U',$page,$temp);
  66. $cookie = $temp[1];
  67. $cook = implode(';',$cookie);
  68. //$cook .= "; " . $lang;
  69. }
  70. }
  71. ?>
  72. <script>document.getElementById('login').style.display='none';</script>
  73. <table width=600 align=center>
  74. </td>
  75. </tr>
  76. <tr>
  77. <td align=center>
  78. <div id=info width=100% align=center>Retrieve upload ID</div>
  79. <?php
  80. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, "/index.php?id=1", 0, $cook, 0, 0, $_GET["proxy"],$pauth);
  81. ?>
  82. <script>document.getElementById('info').style.innerHTML='Connected to netload, retrieving form...';</script>
  83. <?php
  84. is_page ( $page );
  85. unset ( $post );
  86. $url_action = cut_str($page,'<form method="post" action="','"');
  87. $post['upload_hash'] = cut_str($page,'name="upload_hash" value="','"');
  88. $post['remote_file'] = 'http://';
  89. $post['directory_name'] = '';
  90. $url = parse_url ( $url_action );
  91. $cooks = explode(';',$cook);
  92. foreach ($cooks as $temp) {
  93. if (stristr($temp,'cookie_user')) {
  94. $cooks = $temp;
  95. break;
  96. }
  97. }
  98. ?>
  99. <script>document.getElementById('info').style.innerHTML='Uploading...';</script>
  100. <?php
  101. $upfiles = upfile ( $url ["host"], $url ["port"] ? $url ["port"] : 80, $url ["path"] . ($url ["query"] ? "?" . $url ["query"] : ""), "http://netload.in/index.php?id=1", $cooks, $post, $lfile, $lname, "file" );
  102. ?>
  103. <script>document.getElementById('progressblock').style.display='none';</script>
  104. <?php
  105. is_page ( $upfiles );
  106. $loc = "";
  107. preg_match('/ocation: (.*)/',$upfiles,$loc);
  108. $location = $loc[1];
  109. $Url = parse_url($location);
  110. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url['path'].'?'.$Url['query'], "http://netload.in/index.php?id=1", $cook, 0, 0, $_GET["proxy"],$pauth);
  111. is_present( $page, "Upload failed or the file doesn't meet our TOS.");
  112. //is_notpresent ( $upfiles, "downloadurl = '", "File not upload" );
  113. //preg_match ( '/\'(http:.*)\'/' ,$upfiles, $temp);
  114. //$download_link = $temp[1];
  115. $download_link = cut_str($page,'<input type="text" id="txtField" value="','"');
  116. $delete_link = cut_str($page,'<input type="text" id="txtField2" value="','"');
  117. //$download_link = cut_str ( $upfiles, "downloadurl = '", "'" );
  118. }
  119. ?>