KinekaruFounder

Bot Coment deteksi sara Kun Nata

Oct 30th, 2018
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. // 1047404298674527 = Idgrup Kun anta
  2. // dah diset ya ini
  3. // pakein cron job biar otomatis
  4. // Copyright SGB TEAM
  5. <?php
  6. error_reporting(0);
  7. $token = "EAAAAAYsX7TsBAJaUtDjeTFuIxWPEpAsO0E3NB1VqdkFJjHZCdLNnBj7IODH@123dexzRKF7orTZCCjgXx13yUU1CilAUVaMMEdcASZC5WgDAKKfOgmZBSzYUTHgY6qbSz4rSCxkhpgc3uZALvZC4Pl8WQb1Intb8C79FEO5LxaIhQOleopyheGpNgG9uyqwOqkgaH9ZCcgAyxDl5dPT3UxSztLZAdpMex"; // Isi Dengan Akses Token mu
  8. $log = "znohastag-log.txt"; // file Untuk Simpen Status
  9. $limit = 2; // limit status yg di komen, terserah mau berapa
  10.  
  11. function hajar($yuerel, $dataAing=null) {
  12. $cuih = curl_init();
  13. curl_setopt($cuih, CURLOPT_URL, $yuerel);
  14. if($dataAing != null){
  15. curl_setopt($cuih, CURLOPT_POST, true);
  16. curl_setopt($cuih, CURLOPT_POSTFIELDS, $dataAing);
  17. }
  18. curl_setopt($cuih, CURLOPT_FOLLOWLOCATION, true);
  19. curl_setopt($cuih, CURLOPT_RETURNTRANSFER, true);
  20. curl_setopt($cuih, CURLOPT_SSL_VERIFYPEER, false);
  21. $eks = curl_exec($cuih);
  22. curl_close($cuih);
  23. return $eks;
  24. }
  25.  
  26. function simpen($log, $pesen) {
  27. $file = fopen($log,'a+');
  28. fwrite($file,$pesen . PHP_EOL);
  29. fclose($file);
  30. }
  31.  
  32.  
  33. function start() {
  34. global $token;
  35. global $log;
  36. global $limit;
  37. $get = json_decode(file_get_contents("https://graph.facebook.com/1047404298674527/feed?fields=id,message,created_time,from,comments,type&method=GET&limit=".$limit."&access_token=".$token),true);
  38. $i = 0; foreach($get['data'] as $feed) {
  39. $post = $feed['id'];
  40. if (preg_match('/#Islam/', $feed['message']) || preg_match('/#AIIAH/', $feed['message']) || preg_match('/#nabi/', $feed['message'])){
  41. continue;
  42. }
  43.  
  44. if (strpos(file_get_contents($log), $post) == FALSE) {
  45. simpen($log,$post);
  46. echo $feed['message']."<br><br>";
  47. echo komenStatus($post);
  48. } else {
  49. return "This feed already commented.";
  50. }
  51. $i++;
  52. }
  53. }
  54.  
  55.  
  56. function komenStatus($post) {
  57. global $token;
  58. $kata = "
  59. SGB Still here, thank you for welcoming us <3 .
  60.  
  61. we dominate on the internet, and we have dominated this group <3
  62.  
  63. post damai kita gak akan kalah sama post sara kalian <3
  64.  
  65. sgbteam, peace out <3";
  66. $komen = json_decode(hajar("https://graph.facebook.com/$post/comments", array("method" => "POST", "message" => $kata, "access_token" => $token)), true);
  67. // print_r($komen);
  68. if ($komen[id]) {
  69. sleep(10);
  70. flush();
  71. return "Success => " . $komen[id] . "<br>";
  72. } else {
  73. return $komen['error']['message'];
  74. }
  75. }
  76.  
  77. echo start();
Advertisement
Add Comment
Please, Sign In to add comment