Advertisement
EkoAisyah

komen

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