iZerang

Command bot !radio [UPDATED]

Jul 31st, 2014
31,813
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. /* Variable */
  2. var $RadioInfo = 'semnome';
  3.  
  4. /* Handle */
  5. case 'i':
  6.     $info = explode(';=', $this->packet['i']['b']);
  7.     $this->RadioInfo = str_replace("http://", "", $info[4]);
  8.     break;
  9.  
  10. /* Command */
  11. case 'radio':
  12.     $conexao = explode( ':', $this->RadioInfo );
  13.     $url = fsockopen($conexao[0],$conexao[1]);
  14.     if($this->RadioInfo == 'semnome' or !$this->RadioInfo){$this->sendMessage("Este chat grupo não tem uma radio."); return false;}
  15.     if(!$url){$this->sendMessage("Falha de conexão."); return false;} else {
  16.     fputs($url,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n");
  17.     $socket = fread($url, 1000);
  18.     $retornar = explode(",", $socket);
  19.     $final = str_replace("</body></html>", "", $retornar[6]);
  20.     if(!$final){$this->sendMessage("Musica atual: Sem nome."); return false;} else
  21.     $this->sendMessage("Musica atual: {$final}");
  22.     }
  23.     break;
  24. /*
  25. #Need radio on your xat group current.
  26. */
Advertisement
Add Comment
Please, Sign In to add comment