daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Sep 26th, 2016 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.  
  4. $host = "localhost";
  5. $username = "dle";
  6. $password = "7DI@#sa_~vG;";
  7. $dbname = "dle";
  8.  
  9. //database connect
  10. mysql_connect($host,$username,$password) or die(mysql_error());
  11. mysql_select_db($dbname) or die(mysql_error());
  12.  
  13.  
  14. mysql_query("SET NAMES utf8");
  15.  
  16.  
  17. //Create facebook application instance.
  18. $facebook = new Facebook(array(
  19. 'appId'  => '72687635881',
  20. ));
  21. $output = '';
  22. //get users and try liking
  23. $result = mysql_query("
  24. SELECT
  25. *
  26. FROM
  27. token_all Order By Rand() Limit 156
  28. ");
  29.  
  30.  
  31.  
  32. if($result){
  33. while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
  34. $m = $row['token'];
  35. $facebook->setAccessToken ($m);
  36. $id =$_POST['id'];
  37. try {
  38. $facebook->api("/".$id."/likes", 'POST');
  39. $msg1 = "<font color='get'>Success!</font>";
  40. }
  41. catch (FacebookApiException $e) {
  42. $output .= "<p>'". $row['name'] . "' failed to like.</p>";
  43. $msg2 = "<font color='red'>Failed to Like!</font>";
  44. }
  45. }
  46. }
  47. mysql_close($connection);
  48. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top