Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 1047404298674527 = Idgrup Kun anta
- // dah diset ya ini
- // pakein cron job biar otomatis
- // Copyright SGB TEAM
- <?php
- error_reporting(0);
- $token = "EAAAAAYsX7TsBAJaUtDjeTFuIxWPEpAsO0E3NB1VqdkFJjHZCdLNnBj7IODH@123dexzRKF7orTZCCjgXx13yUU1CilAUVaMMEdcASZC5WgDAKKfOgmZBSzYUTHgY6qbSz4rSCxkhpgc3uZALvZC4Pl8WQb1Intb8C79FEO5LxaIhQOleopyheGpNgG9uyqwOqkgaH9ZCcgAyxDl5dPT3UxSztLZAdpMex"; // Isi Dengan Akses Token mu
- $log = "znohastag-log.txt"; // file Untuk Simpen Status
- $limit = 2; // limit status yg di komen, terserah mau berapa
- function hajar($yuerel, $dataAing=null) {
- $cuih = curl_init();
- curl_setopt($cuih, CURLOPT_URL, $yuerel);
- if($dataAing != null){
- curl_setopt($cuih, CURLOPT_POST, true);
- curl_setopt($cuih, CURLOPT_POSTFIELDS, $dataAing);
- }
- curl_setopt($cuih, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($cuih, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($cuih, CURLOPT_SSL_VERIFYPEER, false);
- $eks = curl_exec($cuih);
- curl_close($cuih);
- return $eks;
- }
- function simpen($log, $pesen) {
- $file = fopen($log,'a+');
- fwrite($file,$pesen . PHP_EOL);
- fclose($file);
- }
- function start() {
- global $token;
- global $log;
- global $limit;
- $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);
- $i = 0; foreach($get['data'] as $feed) {
- $post = $feed['id'];
- if (preg_match('/#Islam/', $feed['message']) || preg_match('/#AIIAH/', $feed['message']) || preg_match('/#nabi/', $feed['message'])){
- continue;
- }
- if (strpos(file_get_contents($log), $post) == FALSE) {
- simpen($log,$post);
- echo $feed['message']."<br><br>";
- echo komenStatus($post);
- } else {
- return "This feed already commented.";
- }
- $i++;
- }
- }
- function komenStatus($post) {
- global $token;
- $kata = "
- SGB Still here, thank you for welcoming us <3 .
- we dominate on the internet, and we have dominated this group <3
- post damai kita gak akan kalah sama post sara kalian <3
- sgbteam, peace out <3";
- $komen = json_decode(hajar("https://graph.facebook.com/$post/comments", array("method" => "POST", "message" => $kata, "access_token" => $token)), true);
- // print_r($komen);
- if ($komen[id]) {
- sleep(10);
- flush();
- return "Success => " . $komen[id] . "<br>";
- } else {
- return $komen['error']['message'];
- }
- }
- echo start();
Advertisement
Add Comment
Please, Sign In to add comment