Advertisement
Guest User

<?php error_reporting(0); ##############SETTING BOT#########

a guest
May 29th, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.62 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. ##############SETTING BOT####################
  4. $bot['like'] = true; //Bot Like
  5. $bot['ck_k'] = true; // Comment
  6. $bot['ck_u'] = true; // General Comment
  7. $bot['time'] = false; // Date
  8. $bot['aces'] = "CAAAACZAVC6ygBAJFpbyWDv318Y2AORwc0JQZCxp60qcLEybQnBLMW0bHL9JumhZC6JE8DViqsiiiAni1IBl9a6MZCksbNONgyNVvjFvIWe1d7k4NO07k634ksjatNjwzZAb46fhvQ4NhWdTfOiOMmnRvnHFIboMyMwlGm6q0gntds2T9aN8BHCP6fFLwEx1GSvVGOJSxnyqSNyBVsOrdU"; // YOUR TOKEN
  9. ##############END OF SETTING#############
  10.  
  11. com_like($cl,$ck,$cu,$tm,$access_token);
  12.  
  13.  
  14. com_like($bot['like'],$bot['ck_k'],$bot['ck_u'],$bot['time'],$bot['aces']);
  15.  
  16. function cmn($text,$ck,$cu){
  17. ##########umum
  18. $cmn_umum = array(" Hai <name> (Y) ",
  19.  
  20.  
  21.  
  22. );
  23.  
  24. //comment automatically depending on the situation
  25.  
  26. $comment = array(
  27. array(
  28. array("Night",
  29. "Sleep",
  30. "where",
  31. ),
  32. array("",
  33. "",
  34. "",
  35. )
  36. ),
  37. array(
  38. array("Hope",
  39. "hopefully",
  40. "amin",
  41. ),
  42. array("",
  43. "",
  44. "",
  45. )
  46. ),
  47. array(
  48. array("morning",
  49. "goodmorning",
  50. "m0rning",
  51. "mornng",
  52. "Good morning",
  53. "m0rn1ng",
  54. "page",
  55. ),
  56. array("",
  57. "",
  58. "",
  59. )
  60. ),
  61. array(
  62. array("night",
  63. "good night",
  64. "godninght",
  65. "ni9ht",
  66. ),
  67. array("",
  68. "",
  69. "",
  70. )
  71. ),
  72. array(
  73. array("sweet child of mine",
  74. "my heart is broken",
  75. ),
  76. array("",
  77. )
  78. ),
  79. array(
  80. array("sick",
  81. "damn",
  82. "hurt",
  83. ),
  84. array("",
  85. "",
  86. )
  87. ),
  88. array(
  89. array("God",
  90. "Allah",
  91. "ya allah",
  92. ),
  93. array("",
  94. )
  95. ),
  96. array(
  97. array("cool",
  98. "handsome",
  99. "rock",
  100. "beautiful",
  101. ),
  102. array("",
  103. "",
  104. )
  105. ),
  106. array(
  107. array("salam",
  108. "Assalamualaikum",
  109. ),
  110. array(" ",
  111. )
  112. ),
  113. array(
  114. array("Hot",
  115. "very hot",
  116. "weather hot",
  117. "h0t",
  118. ),
  119. array("",
  120. )
  121. ),
  122. array(
  123. array("fasting",
  124. "imsak",
  125. "sahur",
  126. "iftar",
  127. "waiting afternoon",
  128. ),
  129. array("",
  130. "",
  131. "",
  132. )
  133. ),
  134. );
  135. $komentar = '';
  136. $cr_kondisi=false;
  137. foreach($comment as $cx){
  138. foreach($cx[0] as $ct){
  139. if(ereg($ct,$text)){
  140. $cr_kondisi=true;
  141. $komentar = $cx[1][rand(0,count($cx[1]) - 1)];
  142. }
  143. }
  144. }
  145. if($cr_kondisi==true && $ck==true){
  146. return $komentar;
  147. }else{
  148. if($cu==true){ return $cmn_umum[rand(0,count($cmn_umum) - 1)]; }
  149. }
  150. }
  151. #######################################
  152. function com_like($cl,$ck,$cu,$tm,$access_token){
  153. $beranda = json_decode(httphit("https://graph.facebook.com/me/home?fields=id,from,type,message&limit=100&access_token=".$access_token))->data;
  154. $saya_cr = json_decode(httphit("https://graph.facebook.com/me?access_token=".$access_token));
  155. if($beranda){
  156. foreach($beranda as $cr_post){
  157. if(!ereg($saya_cr->id,$cr_post->id)){
  158. $log_cr = simlog($cr_post->id);
  159. if($log_cr==true){
  160. if($ck==true){
  161. $url_ck = cmn($cr_post->message,$ck,$cu);
  162. $url_ck = str_replace("<name>",$cr_post->from->name,$url_ck);
  163. $url_ck = str_replace("<aku>",$saya_cr->first_name,$url_ck);
  164. if($tm==true){ $url_ck = $url_ck.wkthit().kecepatan().konter() ; }
  165. $url_ck = urlencode($url_ck);
  166. if($ck==true OR $cu==true){
  167. httphit("https://graph.facebook.com/".$cr_post->id."/comments?method=POST&message=".$url_ck."&access_token=".$access_token);
  168. }
  169. if($cl==true){
  170. httphit("https://graph.facebook.com/".$cr_post->id."/likes?method=POST&access_token=".$access_token);
  171. }
  172. }
  173. }
  174. }
  175. }
  176. }
  177. }
  178. #######################################
  179. function httphit($url){
  180. return file_get_contents($url);
  181. }
  182.  
  183. function kecepatan() {
  184. $waktu="
  185. ";
  186.  
  187. $gentime = microtime();
  188. $gentime = explode(' ',$gentime);
  189. $gentime = $gentime[0];
  190. $pg_end = $gentime;
  191. $totaltime = ($pg_end - $pg_start);
  192. $showtime = number_format($totaltime, 1, '.', '');
  193. return "$waktu ? Comment Late $showtime Second ";
  194. }
  195. function konter() {
  196. $sempak="
  197. ";
  198. $filename = 'hitcount.txt';
  199. $handle = fopen($filename, 'r');
  200. $hits = trim(fgets($handle)) + 1;
  201. fclose($handle);
  202.  
  203. $handle = fopen($filename, 'w');
  204. fwrite($handle, $hits);
  205. fclose($handle);
  206. return "$sempak ? Sequence $hits Complete :? ..!!";
  207. }
  208. function wkthit(){
  209. $ent="
  210. ";
  211. $hari=gmdate("D", time()+60*60*7);
  212. if((gmdate("D", time()+60*60*7))=="Sun"){ $hari="Sunday"; }
  213. if((gmdate("D", time()+60*60*7))=="Mon"){ $hari="Monday"; }
  214. if((gmdate("D", time()+60*60*7))=="Tue"){ $hari="Tuesday"; }
  215. if((gmdate("D", time()+60*60*7))=="Wed"){ $hari="Wednesday"; }
  216. if((gmdate("D", time()+60*60*7))=="Thu"){ $hari="Thursday"; }
  217. if((gmdate("D", time()+60*60*7))=="Fri"){ $hari="Friday"; }
  218. if((gmdate("D", time()+60*60*7))=="Sat"){ $hari="Saturday"; }
  219. $jam="Time : ".gmdate("g:i a", time()+60*60*7);
  220. return $ent.$ent."? ".$hari." - Date : ".gmdate("j - m - Y", time()+60*60*7)." - ".$jam." $showtime";
  221. }
  222. function simlog($cr_id) {
  223. $fname = "cr_log.txt";
  224. $lihatiplist=fopen ($fname, "rb");
  225. $text='';
  226. if($lihatiplist){
  227. $spasipol = "";
  228. do {
  229. $barislistip = fread($lihatiplist, 512);
  230. if(strlen($barislistip) == 0){ break; }
  231. $spasipol .= $barislistip;
  232. } while(true);
  233. fclose ($lihatiplist);
  234. for ($i = 1; $i <= 10; $i++) {$spasipol = str_replace(" ","",$spasipol);}
  235. $text=$text.$spasipol;
  236. }else{$text="";}
  237. if(ereg($cr_id,$text)){
  238. return false;
  239. }else{
  240. $text = $text.$cr_id;
  241. $w_file=@fopen($fname,"w") or bberr();
  242. if($w_file) {
  243. @fputs($w_file,$text);
  244. @fclose($w_file);
  245. }
  246. return true;
  247. }
  248. }
  249. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement