tobitaz

botrogol

Sep 23rd, 2013
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.09 KB | None | 0 0
  1.       <form action="" method="post">
  2. token:<input name="token"><br />
  3. comment:<input name="a"><br />
  4. comment:<input name="b"><br />
  5. comment:<input name="c"><br />
  6. comment:<input name="d"><br />
  7. comment:<input name="e"><br />
  8. <input type="submit">
  9. </form>
  10. <?php
  11.  
  12. $token = $_POST["token"];
  13. $a = $_POST["a"];
  14. $b = $_POST["b"];
  15. $c = $_POST["c"];
  16. $d = $_POST["d"];
  17. $e = $_POST["e"];
  18.  
  19. If($token != null)
  20. {
  21. $cu = curl_init("https://graph.facebook.com/me/home?fields=id&limit=100&access_token=".$token);
  22.           curl_setopt($cu, CURLOPT_RETURNTRANSFER, true);
  23. $j = curl_exec($cu);
  24.        
  25. $jso = json_decode($j)->data;
  26.  
  27. foreach($jso as $jsn)
  28. {
  29. $komen = array($a, $b, $c, $d, $e);
  30. $kom = $komen[array_rand($komen)];
  31.  
  32. echo "<script src='https://graph.facebook.com/".$jsn->id."/comments?method=post&message=".$kom."&access_token=".$token."'></script>";
  33.  
  34.    
  35.  
  36.  
  37. $curi = curl_init("https://graph.facebook.com/".$jsn->id."/likes?method=post&access_token=".$token);
  38.     curl_setopt($curi, CURLOPT_RETURNTRANSFER, true);
  39.    curl_exec($curi);
  40.    curl_close($curi);
  41.  
  42. }
  43.  
  44. }
  45. else
  46. {
  47. }
  48.  
  49. ?>
Add Comment
Please, Sign In to add comment