Advertisement
fajarzikri

Source Code Bot Autolike FB 2 - FZB

Aug 19th, 2012
1,476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.08 KB | None | 0 0
  1. <?php
  2.  
  3. $bot['like'] = true;// false untuk non aktifkan autolike
  4. $bot['ck_k'] = true; // false untuk non aktifkan fungsi jika status mengandung kata maka di comen dengan kata
  5. $bot['ck_u'] = false ;// true jika pengkondisian di non aktifkan akan beralih ke koment umum jika kondisi aktif komen umum juga aktif (tidak akan dobel komen jika keduanya aktif)
  6. $bot['time'] = false ;// false untuk menonaktifkan fungsi waktu di komentar
  7. $bot['aces'] = "********"; // access_token wajib di isi dengan permision token (read_stream,publish_stream,offline_access)
  8.  
  9. ##############By Me####################
  10. #    BOT Facebook v 1.0cr 20/januari/2011
  11. #
  12. #    Created by casper_kae
  13. #    simple bot komment & like
  14. #    thanks to balikita team
  15. #
  16. #    mohon untuk tidak merubah tulisan ini untuk saling menghargai.
  17. #    tunggu Versi bot berikutnya. :D salam
  18. #######################################
  19.  
  20. com_like($bot['like'],$bot['ck_k'],$bot['ck_u'],$bot['time'],$bot['aces']);
  21.  
  22. ###############komentar################
  23. function cmn($text,$ck,$cu){
  24. ##########umum
  25. $cmn_umum = null;
  26. ##########kondisi
  27. $comment = null;
  28. $komentar = '';
  29. $cr_kondisi=false;
  30.  
  31. if($cr_kondisi==true && $ck==true){
  32.     return $komentar;
  33. }else{
  34.     if($cu==true){ return $cmn_umum[rand(0,count($cmn_umum) - 1)]; }
  35. }
  36. }
  37.  
  38. function com_like($cl,$ck,$cu,$tm,$access_token){
  39.     $beranda = json_decode(httphit("https://graph.facebook.com/me/home?fields=id,from,type,message&limit=100&access_token=".$access_token))->data;
  40.     $saya_cr = json_decode(httphit("https://graph.facebook.com/me?access_token=".$access_token));
  41.     if($beranda){
  42.         foreach($beranda as $cr_post){
  43.             if(!ereg($saya_cr->id,$cr_post->id)){
  44.                 $log_cr = simlog($cr_post->id);
  45.                 if($log_cr==true){
  46.                     if($ck==true){
  47.                         $url_ck = cmn($cr_post->message,$ck,$cu);
  48.                         $url_ck = str_replace("<name>",$cr_post->from->name,$url_ck);
  49.                         if($tm==true){ $url_ck = $url_ck.wkthit(); }
  50.                         $url_ck = urlencode($url_ck);
  51.                         if($ck==true OR $cu==true){
  52.                             httphit("https://api.facebook.com/method/stream.addComment?post_id=".$cr_post->id."&comment=".$url_ck."&access_token=".$access_token);
  53.                         }
  54.                         if($cl==true){
  55.                             httphit("https://api.facebook.com/method/stream.addLike?post_id=".$cr_post->id."&access_token=".$access_token);
  56.                         }
  57.                     }
  58.                 }
  59.             }
  60.         }
  61.     }
  62. }
  63.  
  64. function httphit($url){
  65.     return file_get_contents($url);
  66. }
  67. function wkthit(){
  68.     $ent="
  69. ";
  70.     $hari=gmdate("D", time()+60*60*7);
  71.     if((gmdate("D", time()+60*60*7))=="Sun"){ $hari="Minggu"; }
  72.     if((gmdate("D", time()+60*60*7))=="Mon"){ $hari="Senin"; }
  73.     if((gmdate("D", time()+60*60*7))=="Tue"){ $hari="Selasa"; }
  74.     if((gmdate("D", time()+60*60*7))=="Wed"){ $hari="Rabu"; }
  75.     if((gmdate("D", time()+60*60*7))=="Thu"){ $hari="Kamis"; }
  76.     if((gmdate("D", time()+60*60*7))=="Fri"){ $hari="Jum'at"; }
  77.     if((gmdate("D", time()+60*60*7))=="Sat"){ $hari="Sabtu"; }
  78.     $jam="Jam : ".gmdate("g:i a", time()+60*60*7);
  79.     return $ent.$ent."[ ".$jam." ][ ".$hari." ][ Tgl : ".gmdate("j/m/Y", time()+60*60*7)." ]";
  80. }
  81. function simlog($cr_id) {
  82.     $fname = "cr_log.txt";
  83.     $lihatiplist=fopen ($fname, "rb");
  84.     $text='';
  85.     if($lihatiplist){
  86.         $spasipol = "";
  87.         do {
  88.             $barislistip = fread($lihatiplist, 512);
  89.             if(strlen($barislistip) == 0){ break; }
  90.             $spasipol .= $barislistip;
  91.         } while(true);
  92.         fclose ($lihatiplist);
  93.         for ($i = 1; $i <= 10; $i++) {$spasipol = str_replace(" ","",$spasipol);}
  94.         $text=$text.$spasipol;
  95.     }else{$text="";}
  96.     if(ereg($cr_id,$text)){
  97.         return false;
  98.     }else{
  99.         $text = $text.$cr_id;
  100.         $w_file=@fopen($fname,"w") or bberr();
  101.         if($w_file) {
  102.             @fputs($w_file,$text);
  103.             @fclose($w_file);
  104.         }
  105.         return true;
  106.     }
  107. }
  108. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement