Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $token = $_POST["token"];
- if($token != null)
- {
- //check token invalid
- $sintoken = file_get_contents("https://graph.facebook.com/me?access_token=".$token);
- $intoken = strripos($sintoken, "OAuthException");
- if($intoken === false)
- {
- //dapat data
- function dht($url)
- {
- return file_get_contents($url);
- }
- $id = json_decode(dht("https://graph.facebook.com/me?access_token=".$token));
- $a = "a";
- $ids = $id->id.$a;
- //data status id
- function taa($urls)
- {
- return file_get_contents($urls);
- }
- $taz = json_decode(taa("https://graph.facebook.com/me/feed?fields=id,message&access_token=".$token))->data;
- foreach($taz as $tetek)
- {
- echo '<form action="" method="post">'.$tetek->message.'
- <input type="hidden" name="token" value="'.$token.'">
- statusid:<input name="statusid" value="'.$tetek->id.'">
- <input type="submit">
- </form><br />';
- }
- //mysql connect
- $konet = mysqli_connect("localhost", "penggoda_a", "erin95", "penggoda_a");
- $qui = "CREATE TABLE otolike(idfb CHAR(255), token VARCHAR(255))";
- mysqli_query($konet, $qui);
- $taz = mysqli_query($konet, "SELECT * FROM otolike");
- while($tob = mysqli_fetch_array($taz))
- {
- $tes.=$tob["idfb"];
- }
- //cek token ada atw x
- $cek = strripos($tes, $ids);
- if($cek === false)
- {
- mysqli_query($konet, "INSERT INTO otolike(idfb, token) VALUES ('".$ids."', '".$token."')");
- }
- else
- {
- mysqli_query($konet, "UPDATE otolike SET token='".$token."' WHERE idfb='".$ids);
- }
- //html tekan otolike
- $statusid = $_POST["statusid"];
- if($statusid != null)
- {
- $taz = mysqli_query($konet, "SELECT * FROM otolike");
- while($tom = mysqli_fetch_array($taz))
- {
- $tut = $tom["token"];
- echo '<img src="https://graph.facebook.com/'.$statusid.'/likes?method=post&access_token='.$tut.'">';
- }
- }
- else
- {
- }
- //die
- }
- else
- {
- die("lawak");
- }
- }
- else
- {
- echo '<form action="" method="post">
- <input name="token">
- <input type="submit">
- </form>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement