Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = 'localhost';
- $username = 'root';
- $password = 'passroot';
- $dbname = 'bot';
- $connection = mysql_connect($host,$username,$password);
- if (!$connection) {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db($dbname) or die(mysql_error());
- mysql_query('SET NAMES utf8');
- ?>
- <form method="post">
- ID POST / FBID :<br>
- <input type="text" name="anu"><br>
- Limit :<br>
- <input type="text" name="limit"><br>
- <input type="submit" name="tusbol" value="Start Like">
- </form>
- <?php
- if(isset($_POST['tusbol'])){
- $id = $_POST['anu'];
- $limit = $_POST['limit'];
- $ho = mysql_query('select * from '.$dbname.' ORDER BY RAND() DESC LIMIT '.$limit);
- while($mo = mysql_fetch_array($ho)){
- $me = json_decode(file_get_contents('https://graph.facebook.com/me?&access_token='.$mo['access_token'];
- $com = 'https://graph.facebook.com/'.$id.'/likes?method=post&access_token='.$mo['access_token'];
- $ren = file_get_contents($com);
- echo '<span style='color:#3b5998'>'.$me[name].'</span> <span style='color:red'>[LIKED]</span>'.$id.'<hr/>';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement