Advertisement
Guest User

asu

a guest
Jan 7th, 2017
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.15 KB | None | 0 0
  1. <?php
  2. include "datapanel.php";
  3. //error_reporting(0);
  4. set_time_limit(0);
  5. ignore_user_abort(1);
  6. @apache_setenv('no-gzip', 1);
  7. @ini_set('zlib.output_compression', 0);
  8. @ini_set('implicit_flush', 1);
  9.  
  10. if(isset($_POST['tambah'])){
  11. $user = $_POST['tambah'];
  12. $uu = json_decode(file_get_contents("https://www.instagram.com/".$user."/?__a=1"), 1);
  13.  
  14. if($uu['user']['username']){
  15.  
  16. $get3 = file_get_contents("datalimit.txt");
  17. if(!preg_match("#$user#", $get3)){
  18.  
  19. if($_POST['jum'] < 30000){
  20.  
  21. if(isset($_POST['per'])){
  22. $per = $_POST['per'];
  23. $myfile = fopen("datalimit.txt", "a") or die("Unable to open file!");
  24. $txt = $user."\n";
  25. fwrite($myfile, $txt);
  26. fclose($myfile);
  27. $jum = $_POST['jum'];
  28.  
  29. $myfile = fopen("data/".$user.".jum", "w") or die("Unable to open file!");
  30. $txt = $jum;
  31. fwrite($myfile, $txt);
  32. fclose($myfile);
  33.  
  34. $myfile = fopen("data/".$user.".per", "w") or die("Unable to open file!");
  35. $txt = $per;
  36. fwrite($myfile, $txt);
  37. fclose($myfile);
  38.  
  39. $file = "user.html";
  40. $handle = fopen($file, 'a');
  41. fwrite($handle, "
  42. <tr>
  43. $user : $jum <br>
  44. </tr>");
  45. fclose($handle);
  46.  
  47. header('Location: index.php?msg=1');
  48. }
  49. }
  50. else { header('Location: index.php?msg=2'); }
  51. }
  52. else { header('Location: index.php?msg=0'); }
  53. }
  54. else { header('Location: index.php?msg=3'); }
  55. }
  56.  
  57.  
  58.  
  59.  
  60. else{
  61. //header("Refresh:0");
  62.  
  63. foreach(file('datalimit.txt') as $line) {
  64. $line = trim($line);
  65. $uu = file_get_contents("https://www.instagram.com/".$line."/?__a=1");
  66. $datas = json_decode($uu, 1);
  67. $id = $datas['user']['id'];
  68. $code = $datas['user']['media']['nodes'][0]['code'];
  69. $id2 = $datas['user']['media']['nodes'][0]['id'];
  70. $thumb = $datas['user']['media']['nodes'][0]['thumbnail_src'];
  71. $url = "https://www.instagram.com/p/".$code."/";
  72. $get3 = file_get_contents("history/".$line.".html");
  73. $jumlah = trim(file_get_contents("data/".$line.".jum"));
  74. if (!preg_match("#$url#", $get3))
  75. {
  76. //AskaEks_secure=4f112ce09a368219084aa9957074504b&username=fhf&password=fghfg
  77.  
  78. for($i=0; $i<file_get_contents("data/".$line.".per"); $i++){
  79.  
  80. echo $str = cookie("http://indofoll-media.com/login", null);
  81. $re = '<input type="hidden" name="AskaEks_secure" value="(.*)" style="display:none;" />';
  82. preg_match($re, $str, $matches);
  83. $tok = $matches[1];
  84. //AskaEks_secure=926ef4db7eefb8babc9a9457d3d4ef539&username=siidhamar&password=siidhamar8816s
  85. request("http://indofoll-media.com/login", "AskaEks_secure=$tok&username=$username1&password=$password1");
  86. flush(); ob_flush();
  87. request("http://indofoll-media.com//ajax", "AskaEks_secure=$tok&url=$url&jumlah=$jumlah");
  88. flush(); ob_flush();
  89. }
  90.  
  91. $id = $line;
  92. $status = "Berhasil";
  93. echo $status."<br>";
  94. $myfile = fopen("history/".$line.".html", "a") or die("Unable to open file!");
  95.  
  96. $txt = "
  97. <style>
  98. table, th, td {
  99. border: 1px solid black;
  100. border-collapse: collapse;
  101. }
  102. th, td {
  103. padding: 5px;
  104. text-align: left;
  105. }
  106. </style>
  107. <table style='width:100%'>
  108. <caption>$line</caption>
  109. <tr>
  110. <th>Id Foto</th>
  111. <th>Link Foto</th>
  112. <th>Foto</th>
  113. <th>Jumlah</th>
  114. <th>Status</th>
  115. </tr>
  116. <tr>
  117. <td>$mediaid</td>
  118. <td>$url</td>
  119. <td><img src='$thumb'alt='$line' style='width:304px;height:228px;'></td>
  120. <td>$jumlah</td>
  121. <td>$status</td>
  122. </tr> </table>";
  123. fwrite($myfile, $txt);
  124. fclose($myfile);
  125. flush(); ob_flush();
  126.  
  127.  
  128. }
  129. else{
  130. echo "done<br>";
  131.  
  132. }
  133. }
  134. }
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146. function cookie($url, $post=null, $proxy=null) {
  147. $header = array("Host: indofoll-media.com",
  148. "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
  149. "Accept-Language: en-US,en;q=0.5",
  150. "Accept-Encoding: gzip, deflate",
  151. "Referer: http://indofoll-media.com/login",
  152. "Connection: keep-alive",
  153. );
  154.  
  155.  
  156.  
  157. $curl = curl_init();
  158. curl_setopt_array($curl, array(
  159. CURLOPT_URL => $url,
  160. CURLOPT_RETURNTRANSFER => 1,
  161. CURLOPT_COOKIEJAR => 'cookie.txt',
  162. CURLOPT_HTTPHEADER => $header,
  163.  
  164. CURLOPT_HEADER =>1,
  165. CURLOPT_AUTOREFERER =>1,
  166. CURLOPT_ENCODING => '',
  167. CURLOPT_USERAGENT => "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
  168.  
  169.  
  170.  
  171. ));
  172. if($proxy){
  173.  
  174. curl_setopt($curl, CURLOPT_PROXY, $proxy);
  175.  
  176. }
  177. if($post) {
  178. curl_setopt($curl, CURLOPT_POST, 1);
  179. curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
  180. }
  181. $data = curl_exec($curl);
  182. if(!$data) {
  183. return $er = 'error';
  184. }
  185.  
  186. curl_close($curl);
  187. return $data;
  188. }
  189.  
  190.  
  191.  
  192. function request($url, $post=null, $proxy=null) {
  193.  
  194. $header = array("Host: indofoll-media.com",
  195. "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
  196. "Accept-Language: en-US,en;q=0.5",
  197. "Accept-Encoding: gzip, deflate",
  198. "Referer: http://indofoll-media.com/login",
  199. "Connection: keep-alive",
  200. );
  201. $curl = curl_init();
  202. curl_setopt_array($curl, array(
  203. CURLOPT_URL => $url,
  204. CURLOPT_RETURNTRANSFER => 1,
  205. CURLOPT_COOKIEFILE => 'cookie.txt',
  206. //CURLOPT_COOKIEJAR => 'cookie.txt',
  207. CURLOPT_HEADER => 1,
  208. CURLOPT_HTTPHEADER => $header,
  209. CURLOPT_AUTOREFERER =>1,
  210. CURLOPT_ENCODING => '',
  211. CURLOPT_USERAGENT => "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0"
  212.  
  213.  
  214.  
  215. ));
  216.  
  217. if($proxy){
  218.  
  219. curl_setopt($curl, CURLOPT_PROXY, $proxy);
  220.  
  221. }
  222. if($post) {
  223. curl_setopt($curl, CURLOPT_POST, 1);
  224. curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
  225. }
  226. $data = curl_exec($curl);
  227. if(!$data) {
  228. return $er = 'error';
  229. }
  230.  
  231. curl_close($curl);
  232. return $data;
  233. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement