daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Nov 3rd, 2013 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 $Rcon = new MinecraftRcon;
  2.                
  3.                 $Rcon->Connect( MQ_SERVER_ADDR, MQ_SERVER_PORT, MQ_SERVER_PASS, MQ_TIMEOUT );
  4.                 $element[]='give $nick 130 1';
  5.                 $element[]='give $nick 1 64';
  6.                 $cmd = $element[array_rand($element,1)];
  7.                 $Rcon->Command("$cmd");
  8.                 $Data = $Rcon->Command( null );
  9.  
  10.                 if( $Data === false )
  11.                 {
  12.                         throw new MinecraftRconException( "" );
  13.                 }
  14.                 else if( StrLen( $Data ) == 0 )
  15.                 {
  16.                         throw new MinecraftRconException( "" );
  17.                 }
  18.                
  19.                 echo HTMLSpecialChars( $Data );
  20.         }
  21.         catch( MinecraftRconException $e )
  22.         {
  23.                 echo $e->getMessage( );
  24.         }
  25.        
  26.         $Rcon->Disconnect( );
  27. }
  28. else{
  29. echo '<b><center>Kod niepoprawny</center></b>';
  30. }
  31. }
  32. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top