Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $m="\033[1;31m";
- $n="\033[1;37m";
- $h="\033[1;32m";
- if(!file_exists('.shutdown57_irc.conf')){
- echo "$m Please input your nickname : $n"; $nick=trim(fgets(STDIN));
- if($nick){
- $fp=fopen(".shutdown57_irc.conf","w");
- if(fwrite($fp,$nick)){
- echo "$h [+] $n DONE .. \n";
- echo "$m [!] $n Please, Come back!\n";
- }
- @fclose($fp);
- }
- }else{
- function a_kirim($nick,$msg){
- $c=curl_init();
- curl_setopt($c,CURLOPT_URL,"http://achan48.com/irc/kirim.php");
- curl_setopt($c,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($c,CURLOPT_POST,1);
- curl_setopt($c,CURLOPT_POSTFIELDS,array(
- "nickname"=>$nick,
- "pesan"=>$msg,));
- $e=curl_exec($c);
- return preg_match("/berhasil/",$e);
- curl_close($c);
- }
- function a_pesan(){
- $c=curl_init();
- curl_setopt($c,CURLOPT_RETURNTRANSFER,1);
- curl_setopt($c,CURLOPT_URL,"http://achan48.com/irc/chat.php");
- curl_setopt($c,CURLOPT_HEADER,0);
- $e=curl_exec($c);
- return $e;
- }
- function a_pisah($pemisah,$string){
- return explode(chr(1),str_replace($pemisah,chr(1),$string));
- }
- function a_tampil(){
- $tampil = a_pisah(array('irc1','irc2'),a_pesan());
- print_r($tampil[1]);
- }
- function a_msg(){
- $m="\033[1;31m";
- $n="\033[1;37m";
- $h="\033[1;32m";
- echo "$m pesec@".$h.file_get_contents(".shutdown57_irc.conf").":/message $ $n"; $msg=trim(fgets(STDIN));
- if(a_kirim(file_get_contents(".shutdown57_irc.conf"),$msg)){
- @system("clear");
- a_tampil();
- a_msg();
- }else{
- echo "gagal\n";
- a_msg();
- }
- }
- a_tampil();
- a_msg();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement