Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // coded by shutdown57
- error_reporting(0);
- Class DeleterFB{
- public $token;
- public function kentu($url, $fields = null, $cookie = null) {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- if($fields !== null) {
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
- }
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5000);
- $response = curl_exec($ch);
- curl_close($ch);
- return $response;
- }
- public function getToken()
- {
- echo "Paste Access Token :: "; $token=trim(fgets(STDIN));
- return $token;
- }
- public function grabData($token)
- {
- $data = $this->kentu('https://graph.facebook.com/me/posts?access_token='.$token.'&limit=1000&fields=id,name');
- return json_decode($data);
- }
- public function delete_run()
- {
- $token = $this->getToken();
- $jem = $this->grabData($token);
- $num=1;
- foreach($jem->data as $but) {
- $re = $this->kentu("https://graph.facebook.com/".$but->id."/?method=delete", "access_token=$token");
- if($re == true || $re == 1) {
- echo "[".$num++."] POSTINGAN ALAY TERHAPUS :V | POST ID: ".$but->id;
- if(@$but->name!="" || !empty($but->name))
- {
- echo " [".$but->name."] \n";
- }else{
- echo "\n";
- }
- } else {
- echo "[".$num++."] GAGAL MENGHAPUS POSTINGAN : ".$but->id." ".$cu." \n";
- }
- }
- }
- }
- $s57 = new DeleterFB();
- $s57->delete_run();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement