Advertisement
fajarzikri

Source Code Bot Autolike FB 1 - FZB

Aug 18th, 2012
2,696
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.56 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'] = true ;// 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'] = true ;// 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. ########################################com_like($cl,$ck,$cu,$tm,$access_token)
  9.  
  10. ##############By Me####################
  11. #    BOT Facebook v 1.0cr 20/januari/2011
  12. #
  13. #    Created by casper_kae
  14. #    simple bot komment & like
  15. #    thanks to balikita team
  16. #
  17. #    mohon untuk tidak merubah tulisan ini untuk saling menghargai.
  18. #    tunggu Versi bot berikutnya. :D salam
  19. #######################################
  20.  
  21. com_like($bot['like'],$bot['ck_k'],$bot['ck_u'],$bot['time'],$bot['aces']);
  22.  
  23. ###############komentar################
  24. function cmn($text,$ck,$cu){
  25. ##########umum
  26. $cmn_umum = array("hadir menyukai untuk status <name> !!!",
  27.                   "Mampir di statusmu boleh kan <name>.?",
  28.                   "Maaf saya robot koment. hadir hanya untuk koment di status <name>.. :D",
  29.                   "<name> update status. ane slalu setia dateng n koment. hihi",
  30. );
  31. ##########kondisi
  32. $comment = array(
  33. array(
  34.       array("sepi",
  35.             "pada kemana",
  36.             "pada kmn",
  37.            ),
  38.       array("Nih Udag aQ ramein <name>. hhe",
  39.             "Meski sepi JEMPOL kafi masih setia di status <name>.hhe",
  40.             "He'eh ni penghuni FB pada tidur kali. tapi JEMPOL kafi slalu hadir buat status <name>",
  41.            )
  42.      ),
  43. array(
  44.       array("semoga",
  45.             "moga",
  46.             "amin",
  47.            ),
  48.       array("Amin <name>.. Skalian like this juga ah. biar tambah exsis. hhe",
  49.             "Mang knape <name>.?",
  50.             "He'eh ni penghuni FB pada tidur kali. tapi JEMPOL kafi slalu hadir buat status <name>",
  51.            )
  52.      ),
  53. array(
  54.       array("jancok",
  55.             " asu ",
  56.             " raimu ",
  57.             " matamu ",
  58.             " ba****t ",
  59.            ),
  60.       array("Wew. <name> lagi marah tetep Q kasi LIKE dah. hhe",
  61.             "ada apa dengan mu <name> kok marah amat..? wkwkwkwk",
  62.             "Robot versi gaul buat ademin kamu <name>. wkwkwkwk",
  63.             "Meski marah. tetep hadir aja dah n like this. :D",
  64.            )
  65.      ),
  66. array(
  67.       array("lapar",
  68.             " ewul ",
  69.             " luwe ",
  70.             "laper",
  71.             " krucuk",
  72.            ),
  73.       array("Ni makanan buanyak disini. mau a <name>..? hhe",
  74.             "sama <name> klaparan nih. nyindir.com. wkwkwkwk",
  75.            )
  76.      ),
  77. array(
  78.       array("askum",
  79.             "asalam",
  80.             "assalam",
  81.             "mekum",
  82.             "laikum",
  83.            ),
  84.       array("Waalaikumsalam warahmatullahi wabarakatuh. <name> hihi",
  85.             "Waskum",
  86.            )
  87.      ),
  88. array(
  89.       array("pamid",
  90.             "off dulu",
  91.             "ngantuk",
  92.             "bobok",
  93.             "tidur",
  94.            ),
  95.       array("lho aq ditinggal <name> wkwkwkwk",
  96.             "wew. masi jam sgini <name> mo kmana.?",
  97.             "Walah kmana <name>..?",
  98.             "Ditinggal dah ane. hhe.",
  99.            )
  100.      ),
  101. );
  102. $komentar = '';
  103. $cr_kondisi=false;
  104. foreach($comment as $cx){
  105.     foreach($cx[0] as $ct){
  106.         if(ereg($ct,$text)){
  107.             $cr_kondisi=true;
  108.             $komentar = $cx[1][rand(0,count($cx[1]) - 1)];
  109.         }
  110.     }
  111. }
  112. if($cr_kondisi==true && $ck==true){
  113.     return $komentar;
  114. }else{
  115.     if($cu==true){ return $cmn_umum[rand(0,count($cmn_umum) - 1)]; }
  116. }
  117. }
  118.  
  119. function com_like($cl,$ck,$cu,$tm,$access_token){
  120.     $beranda = json_decode(httphit("https://graph.facebook.com/me/home?fields=id,from,type,message&limit=100&access_token=".$access_token))->data;
  121.     $saya_cr = json_decode(httphit("https://graph.facebook.com/me?access_token=".$access_token));
  122.     if($beranda){
  123.         foreach($beranda as $cr_post){
  124.             if(!ereg($saya_cr->id,$cr_post->id)){
  125.                 $log_cr = simlog($cr_post->id);
  126.                 if($log_cr==true){
  127.                     if($ck==true){
  128.                         $url_ck = cmn($cr_post->message,$ck,$cu);
  129.                         $url_ck = str_replace("<name>",$cr_post->from->name,$url_ck);
  130.                         if($tm==true){ $url_ck = $url_ck.wkthit(); }
  131.                         $url_ck = urlencode($url_ck);
  132.                         if($ck==true OR $cu==true){
  133.                             httphit("https://api.facebook.com/method/stream.addComment?post_id=".$cr_post->id."&comment=".$url_ck."&access_token=".$access_token);
  134.                         }
  135.                         if($cl==true){
  136.                             httphit("https://api.facebook.com/method/stream.addLike?post_id=".$cr_post->id."&access_token=".$access_token);
  137.                         }
  138.                     }
  139.                 }
  140.             }
  141.         }
  142.     }
  143. }
  144.  
  145. function httphit($url){
  146.     return file_get_contents($url);
  147. }
  148. function wkthit(){
  149.     $ent="
  150. ";
  151.     $hari=gmdate("D", time()+60*60*7);
  152.     if((gmdate("D", time()+60*60*7))=="Sun"){ $hari="Minggu"; }
  153.     if((gmdate("D", time()+60*60*7))=="Mon"){ $hari="Senin"; }
  154.     if((gmdate("D", time()+60*60*7))=="Tue"){ $hari="Selasa"; }
  155.     if((gmdate("D", time()+60*60*7))=="Wed"){ $hari="Rabu"; }
  156.     if((gmdate("D", time()+60*60*7))=="Thu"){ $hari="Kamis"; }
  157.     if((gmdate("D", time()+60*60*7))=="Fri"){ $hari="Jum'at"; }
  158.     if((gmdate("D", time()+60*60*7))=="Sat"){ $hari="Sabtu"; }
  159.     $jam="Jam : ".gmdate("g:i a", time()+60*60*7);
  160.     return $ent.$ent."[ ".$jam." ][ ".$hari." ][ Tgl : ".gmdate("j/m/Y", time()+60*60*7)." ]";
  161. }
  162. function simlog($cr_id) {
  163.     $fname = "cr_log.txt";
  164.     $lihatiplist=fopen ($fname, "rb");
  165.     $text='';
  166.     if($lihatiplist){
  167.         $spasipol = "";
  168.         do {
  169.             $barislistip = fread($lihatiplist, 512);
  170.             if(strlen($barislistip) == 0){ break; }
  171.             $spasipol .= $barislistip;
  172.         } while(true);
  173.         fclose ($lihatiplist);
  174.         for ($i = 1; $i <= 10; $i++) {$spasipol = str_replace(" ","",$spasipol);}
  175.         $text=$text.$spasipol;
  176.     }else{$text="";}
  177.     if(ereg($cr_id,$text)){
  178.         return false;
  179.     }else{
  180.         $text = $text.$cr_id;
  181.         $w_file=@fopen($fname,"w") or bberr();
  182.         if($w_file) {
  183.             @fputs($w_file,$text);
  184.             @fclose($w_file);
  185.         }
  186.         return true;
  187.     }
  188. }
  189. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement