Advertisement
susilo

Untitled

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