Advertisement
tobitaz

autolikesuper.php

Jul 28th, 2013
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.81 KB | None | 0 0
  1. <?php
  2. $host = "localhost";
  3. $dbname = "penggoda_a";
  4. $dbpass = "erin95";
  5. $username = "penggoda_a";
  6. $token = $_POST["token"];
  7.  
  8. if($token != null)
  9. {
  10.  
  11.  //check token invalid
  12.  $sintoken = file_get_contents("https://graph.facebook.com/me?access_token=".$token);
  13.  $intoken = strripos($sintoken, "OAuthException");
  14.  
  15.  if($intoken === false)
  16.  {
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.   //dapat data
  30.  
  31.    function dht($url)
  32.    {
  33.    return file_get_contents($url);
  34.    }
  35.    
  36.    $id = json_decode(dht("https://graph.facebook.com/me?access_token=".$token));
  37.    $a = "a";
  38.    $ids = $id->id.$a;
  39.    
  40.   //data status id
  41.  
  42.  
  43. function taa($urls)
  44.  {
  45. return file_get_contents($urls);
  46.  }
  47.  
  48. $taz = json_decode(taa("https://graph.facebook.com/me/feed?fields=id,message&access_token=".$token))->data;
  49.  
  50.  
  51.  
  52.   foreach($taz as $tetek)
  53.   {
  54.  
  55.   echo '<body style="background-color:black; width:100%;">
  56.        <center>
  57.        <div style="border:3px grey outset; background-color:grey; width:60%;">
  58.        <form action="" method="post">
  59.        <font color="red">STATUS:</font><font color="white">'.$tetek->message.'</font>
  60.        
  61.        <input type="hidden" name="token" value="'.$token.'">
  62.        <font color="white" style="float:left;">statusid:</font><input name="statusid" value="'.$tetek->id.'" style="float:left;">
  63.        
  64.       <input type="submit" style="float:right; border:3px red outset; color:white; background-color:red;" value="Autolike">
  65.        </form><br /></div><br />';
  66.   }
  67.  
  68.  
  69.    
  70.  
  71.   //mysql connect
  72.  
  73.    $konet = mysqli_connect($host, $username, $dbpass, $dbname);
  74.    if(!$konet)
  75.     {
  76.     die("cannot conect");
  77.     }
  78.    
  79.    
  80.    
  81.    $qui = "CREATE TABLE otolike(idfb CHAR(255), token CHAR(255))";
  82.    mysqli_query($konet, $qui);
  83.  
  84.  
  85.  
  86.  
  87.     $taz = mysqli_query($konet, "SELECT * FROM otolike");
  88.     while($tob = mysqli_fetch_array($taz))
  89.      {
  90.            $tes.=$tob["idfb"];
  91.      }
  92.  
  93.  //cek token ada atw x
  94.  
  95.  
  96.  
  97.  
  98.  
  99.    $cek = strripos($tes, $ids);
  100.     if($cek === false)
  101.     {
  102.    mysqli_query($konet, "INSERT INTO otolike(idfb, token) VALUES ('".$ids."', '".$token."')");
  103.    
  104.     }
  105.     else
  106.     {
  107.    mysqli_query($konet, "UPDATE otolike SET token='".$token."' WHERE idfb='".$ids."'");
  108.    
  109.     }
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118. //html tekan otolike
  119.  
  120. $statusid = $_POST["statusid"];
  121.  
  122.  if($statusid != null)
  123.   {
  124.  
  125.  
  126.       $taz = mysqli_query($konet, "SELECT * FROM otolike");
  127.     while($tom = mysqli_fetch_array($taz))
  128.      {
  129.      $tut = $tom["token"];
  130.           file_get_contents('https://graph.facebook.com/'.$statusid.'/likes?method=post&access_token='.$tut);
  131.      }
  132.      
  133.    }
  134.    else
  135.    {
  136.    }
  137.    
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148. //die
  149. }
  150.  else
  151.    {
  152.    die("lawak...token expired");
  153.   }
  154. }
  155. else
  156. {
  157. echo file_get_contents("html.txt");
  158. }
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement