Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set('display_errors', '1');
- class like_posts
- {
- const id ='';
- public function token() {
- if(isset($_POST['tokens']) && isset($_POST['profile_id'])){
- global $tokens_array;
- $tokens=htmlentities($_POST['tokens']);
- $profile_id=htmlentities($_POST['profile_id']);
- $tokens_array = explode(',', $tokens);
- $response = array();
- if(!empty($tokens_array)) {
- foreach($tokens_array as $token) {
- $response[] = $this->check_post($token, $profile_id);
- }
- }
- return $response;
- }
- }
- public function check_post($token,$profile_id)
- {
- $url = file_get_contents("https://graph.facebook.com/$profile_id/feed?fields=id&access_token=$token");
- $Json = json_decode($url, true);
- $id = $Json['data']['0']['id'];
- $profile_id = $profile_id . '_';
- $post_id = str_replace($profile_id, '', $id); //income
- if($post_id != self::id) {
- return [
- 'id' => $post_id,
- 'updated' => true,
- ];
- } else {
- return [
- 'id' => $post_id,
- 'updated' => false,
- ];
- }
- }
- }
- $run = new like_posts;
- print '<pre>';
- print_r($run->token());
- print '</pre>';
- ?>
- <html>
- <body>
- <center>
- <font size="6" color="white" style="text-shadow: 3px 3px 4px black;"><b> [+]Like posts[+]</b></font><br><br>
- <form action="" method="POST">
- <textarea id = "domainlist" name = "tokens" cols="40" rows="6" placeholder="Token"><?php echo !empty($_POST['tokens']) ? $_POST['tokens'] : null; ?></textarea><br>
- Profile id: <input type="text" name="profile_id" value="<?php echo !empty($_POST['profile_id']) ? $_POST['profile_id'] : null; ?>"><br>
- <input type="submit" value="Submit">
- </form>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement