Nieuw lid |
|
<?
$ip = '12.34.56.78';
$port = 27015;
$rconpwd = 'hard2guess';
$ping = 25;//miliseconds
class SlincherWebRCON
{
var $_pings = array();
var $_handle;
var $_rconpassword;
var $_challenge;
var $_status = array('hostname'=>'','version'=>'','VAC'=>'','host'=>'','port'=>'','map'=>'','password'=>'','players'=>'');
var $_players = array();
var $_timeout = 50;//50 ms waiting is really long
function raw_rcon($string)
{
return $this->rcon_to_string($this->write_data('rcon '.$this->_challenge.' "'.$this->_rconpassword.'" '.$string));
// most output is chr 108 , hex = 6c , that means that something has been executed
}
function connect($host,$port,$rconpassword,$timeout=50)
{
$this->_handle=fsockopen('udp://'.$host,$port);
stream_set_timeout($this->_handle,0,$this->_timeout);
$this->_rconpassword=$rconpassword;
$this->_timeout=$timeout;
$this->_challenge=$this->challengercon_to_rcon($this->rcon_to_string($this->write_data('challenge rcon')));
}
function rcon_to_string($string)
{
return trim(substr($string,4,-1));
}
function challengercon_to_rcon($string)
{
return substr($string,15);
}
function write_data($string )
{
$string=str_replace(chr(0),'',$string);$string=str_replace(chr(255),'',$string);
fwrite($this->_handle,chr(255).chr(255).chr(255).chr(255).$string.chr(0));
$i=0;$gets.='';
while(strlen($gets)==0)
{
if($i<$this->_timeout)
{
$gets.=fgets($this->_handle,2);
usleep(1);
$i++;
}
else
{
return 0;
}
}
$this->_pings[] = $i;
$strlen=0;
while($strlen<strlen($gets))
{
$togo=socket_get_status($this->_handle);
$strlen=strlen($gets);
$gets.=fgets($this->_handle,$togo['unread_bytes']+1);
}
return $gets;
}
function get_status()
{
preg_match('@^l"sv_password" is "([^"]*)"$@',$this->rcon_to_string($this->write_data('rcon '.$this->_challenge.' "'.$this->_rconpassword.'" sv_password')),$pass);$this->_status['password']=$pass[1];unset($pass);
$raw = explode("\n",$this->rcon_to_string($this->write_data('rcon '.$this->_challenge.' "'.$this->_rconpassword.'" status')));
foreach($raw as $num=>$temp)
{
if(preg_match('#^lhostname[ ]*: (.*)$#',$temp,$temp))
{
$this->_status['hostname'] = $temp[1];
unset($raw[$num]);
}
unset($temp);
}
foreach($raw as $num=>$temp)
{
if(preg_match('#^version[ ]*: ([^ ]+ [0-9]+) (.+)$#',$temp,$temp))
{
$this->_status['version'] = $temp[1];
$this->_status['VAC'] = $temp[2];
unset($raw[$num]);
}
unset($temp);
}
foreach($raw as $num=>$temp)
{
if(preg_match('#^tcp/ip[ ]*: (.+):(.+)$#',$temp,$temp))
{
$this->_status['host'] = $temp[1];
$this->_status['port'] = $temp[2];
unset($raw[$num]);
}
unset($temp);
}
foreach($raw as $num=>$temp)
{
if(preg_match('#^map[ ]*: (.+) at: [0-9\.]+ x, [0-9\.]+ y, [0-9\.]+ z$#',$temp,$temp))
{
$this->_status['map'] = $temp[1];
unset($raw[$num]);
}
unset($temp);
}
foreach($raw as $num=>$temp)
{
if(preg_match('#^players[ ]*: ([0-9]+) active \(([0-9]+) max\)$#',$temp,$temp))
{
$this->_status['players'] = array('online'=>$temp[1],'max'=>$temp[2]);
unset($raw[$num]);
}
unset($temp);
}
foreach($raw as $num=>$temp)
{
if(preg_match('@^#[ ]*[0-9]+[ ]+"([^"]+)"[ ]*([0-9]+)[ ]+([^ ]+)[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+([^ ]+)$@',$temp,$matches))
{
$matches[4] = explode(':',$matches[4]);$matches[4] = $matches[4][0];
$this->_players[]=array('name'=>$matches[1],'kick_id'=>'#'.$matches[2],'ban_id'=>$matches[3],'ip'=>$matches[4]);
unset($raw[$num]);
}
}
}
}
$RCON = new SlincherWebRCON();
$RCON->connect($ip,$port,$rconpwd,$ping);
if($RCON->_challenge)
{
if($_FILES['postconfig'])
{
$contents = explode("\n",file_get_contents($_FILES['postconfig']['tmp_name']));
$clean=array();
foreach($contents as $n=>$row)
{
$row=trim($row," \t\n\r\0\x0B;");
$i=0;
$open=2;
while($i<strlen($row))
{
if($row{$i} == '"')
{
if($open==1)
{
$open=2;
}
elseif($open==2)
{
$open=1;
}
}
elseif($row{$i} == ';')
{
if($open==2)
{
$row{$i} = "\n";
}
}
$i++;
}
if(strlen($row)>0)
{
foreach(explode("\n",$row) as $cmd)
{
if(preg_match('@^rcon(.+)$@i',$row,$match))
{
$cmd = ltrim($match[1]);
}
$clean[] = $cmd;
unset($match);
}
}
unset($cmd);
}
unset($row);unset($n);
foreach($clean as $exec)
{
$q = $RCON->raw_rcon($exec);
if($q)
{
echo '<LI> '.htmlspecialchars($exec).' is succesvol uitgevoerd.';
}
unset($q);
}
echo '<BR><BR>Config is uitgevoerd.';
}
if($_POST['say'])
{
$q = $RCON->raw_rcon('say '.stripslashes($_POST['say']));
if($q{0} == 'l')
{
echo '<LI> Chat is uitgevoerd.<BR><BR>';
}
else
{
echo '<LI> Chat is <B>niet</B> uitgevoerd.<BR><BR>';
}
unset($q);
}
if($_POST['rawrcon'])
{
$q = $RCON->raw_rcon(stripslashes($_POST['rawrcon']));
if($q{0} == 'l')
{
echo '<LI> RCON Commando is uitgevoerd.<BR><BR>';
}
else
{
echo '<LI> RCON Commando is <B>niet</B> uitgevoerd.<BR><BR>';
}
unset($q);
}
if($_POST['restartround'] == '1')
{
$q = $RCON->raw_rcon('sv_restartround 1');
if($q{0} == 'l')
{
echo '<LI> RestartRound is uitgevoerd.<BR><BR>';
}
else
{
echo '<LI> RestartRound is <B>niet</B> uitgevoerd.<BR><BR>';
}
unset($q);
}
if($_POST['hostname'])
{
$q = $RCON->raw_rcon('hostname "'.stripslashes($_POST['hostname'].'"'));
if($q{0} == 'l')
{
echo '<LI> Hostname is veranderd.<BR><BR>';
}
else
{
echo '<LI> Hostname is <B>niet</B> veranderd.<BR><BR>';
}
unset($q);
}
if($_POST['password'])
{
$q = $RCON->raw_rcon('sv_password "'.stripslashes($_POST['password'].'"'));
if($q{0} == 'l')
{
echo '<LI> Wachtwoord is veranderd.<BR><BR>';
}
else
{
echo '<LI> Wachtwoord is <B>niet</B> veranderd.<BR><BR>';
}
unset($q);
}
if($_POST['changelevel'])
{
$q = $RCON->raw_rcon('changelevel '.stripslashes($_POST['changelevel']));
echo 'De server zal niet reageren, omdat de map gewisseld word.';
}
if(($_POST['player_action'] == 'kick') AND $_POST['kick_id'])
{
$q = $RCON->raw_rcon('kick '.stripslashes($_POST['kick_id']));
if($q{0} == 'l')
{
echo '<LI> Kick is uitgevoerd.<BR><BR>';
}
else
{
echo '<LI> Kick is <B>niet</B> veranderd.<BR><BR>';
}
unset($q);
}
elseif(($_POST['player_action'] == 'id_ip_ban') AND $_POST['ban_id'] AND $_POST['ban_ip'])
{
$q = $RCON->raw_rcon('banid '.stripslashes($_POST['ban_time']).' '.stripslashes($_POST['ban_id']).' kick');
$RCON->raw_rcon('addip '.stripslashes($_POST['ban_time']).' '.stripslashes($_POST['ban_ip']));
$RCON->raw_rcon('writeid');
$RCON->raw_rcon('writeip');
if($q{0} == 'l')
{
echo '<LI> SteamID&IP-Ban is uitgevoerd.<BR><BR>';
}
else
{
echo '<LI> SteamID&IP-Ban is <B>niet</B> veranderd.<BR><BR>';
}
unset($q);
}
elseif(($_POST['player_action'] == 'id_ban') AND $_POST['ban_id'])
{
$q = $RCON->raw_rcon('banid '.stripslashes($_POST['ban_time']).' '.stripslashes($_POST['ban_id']).' kick');
$RCON->raw_rcon('writeid');
if($q{0} == 'l')
{
echo '<LI> SteamID-Ban is uitgevoerd.<BR><BR>';
}
else
{
echo '<LI> SteamID-Ban is <B>niet</B> veranderd.<BR><BR>';
}
unset($q);
}
elseif(($_POST['player_action'] == 'ip_ban') AND $_POST['ban_ip'])
{
$RCON->raw_rcon('addip '.stripslashes($_POST['ban_time']).' '.stripslashes($_POST['ban_ip']));
$RCON->raw_rcon('writeip');
if($q{0} == 'l')
{
echo '<LI> IP-Ban is uitgevoerd.<BR><BR>';
}
else
{
echo '<LI> IP-Ban is <B>niet</B> veranderd.<BR><BR>';
}
unset($q);
}
$RCON->get_status();
echo '<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 STYLE="font-family:verdana;font-size:12"><TR><TD>#Info</TD><TD> </TD></TR>';
echo '<TR><TD>protocol-versie</TD><TD> '.$RCON->_status['version'].'</TD></TR>';
echo '<TR><TD>VALVe Anti Cheat</TD><TD> '.$RCON->_status['VAC'].'</TD></TR>';
echo '<TR><TD>Hostname:Port</TD><TD> '.$RCON->_status['host'].':'.$RCON->_status['port'].'</TD></TR>';
echo '<TR><TD>Map</TD><TD> '.$RCON->_status['map'].'</TD></TR>';
echo '<TR><TD>Players</TD><TD> '.$RCON->_status['players']['online'].'/'.$RCON->_status['players']['max'].'</TD></TR>';
echo '<TR><TD>Latency</TD><TD> '.round(array_sum($RCON->_pings)/count($RCON->_pings),0).' ms</TD></TR>';
echo '</TABLE></FONT><BR>';
echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=SUBMIT VALUE="Refresh" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>';
echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=HIDDEN NAME="restartround" VALUE=1><INPUT TYPE=SUBMIT VALUE="Restart Round" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>';
echo '<FORM enctype="multipart/form-data" ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=FILE NAME="postconfig" VALUE=1><INPUT TYPE=SUBMIT VALUE="Upload Config!" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>';
echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=TEXT VALUE="say [WEB-RCON door Slincher!]" STYLE="width:125;font-size:11;font-family:verdana;" NAME="rawrcon"><INPUT TYPE=SUBMIT VALUE="RCON Commando" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>';
echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=TEXT STYLE="width:125;font-size:11;font-family:verdana;" NAME="say"><INPUT TYPE=SUBMIT VALUE="Chat!" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>';
echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=TEXT VALUE="'.$RCON->_status['hostname'].'" STYLE="width:125;font-size:11;font-family:verdana;" NAME="hostname"><INPUT TYPE=SUBMIT VALUE="Verander Hostname" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>';
echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=TEXT VALUE="'.$RCON->_status['password'].'" STYLE="width:125;font-size:11;font-family:verdana;" NAME="password"><INPUT TYPE=SUBMIT VALUE="Password" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>';
echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><SELECT NAME=changelevel STYLE="width:125;font-size:11;font-family:verdana;">';
$maps=array('de_nuke','de_dust2','de_inferno','de_cpl_mill','de_cbble','de_dust','aim_ak-colt');
sort($maps);
foreach($maps as $map)
{
echo '<OPTION VALUE="'.$map.'">'.$map.'</OPTION>';
}
unset($maps);unset($map);
echo '</SELECT><INPUT TYPE=SUBMIT VALUE="Verander Map" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>';
echo '<BR><B>Spelers:</B><BR>';
foreach($RCON->_players as $player)
{
echo "\r\n".'<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><NOBR><INPUT TYPE=HIDDEN NAME=kick_id VALUE="'.$player['kick_id'].'"><INPUT TYPE=HIDDEN NAME=ban_id VALUE="'.$player['ban_id'].'"><INPUT TYPE=HIDDEN NAME=ban_ip VALUE="'.$player['ip'].'"><SELECT STYLE="width:125;font-size:11;font-family:verdana;" NAME="player_action"><OPTION VALUE="kick">Kick</OPTION><OPTION VALUE="id_ip_ban">SteamID&IP Ban</OPTION><OPTION VALUE="id_ban">SteamID Ban</OPTION><OPTION VALUE="ip_ban">IP Ban</OPTION></SELECT><SELECT STYLE="width:125;font-size:11;font-family:verdana;" NAME="ban_time"><OPTION VALUE="0">permanent (Ban Only)</OPTION><OPTION VALUE="1">1 minuut (Ban Only)</OPTION><OPTION VALUE="5">5 minuten (Ban Only)</OPTION><OPTION VALUE="30">half-uur (Ban Only)</OPTION><OPTION VALUE="60">1 uur (Ban Only)</OPTION><OPTION VALUE="240">4 uur (Ban Only)</OPTION><OPTION VALUE="1440">1 dag (Ban Only)</OPTION><OPTION VALUE="4320">3 dagen (Ban Only)</OPTION><OPTION VALUE="10080">1 week (Ban Only)</OPTION><OPTION VALUE="43200">1 maand (Ban Only)</OPTION><OPTION VALUE="525600">1 jaar (Ban Only)</OPTION></SELECT><INPUT TYPE=SUBMIT VALUE="'.htmlspecialchars($player['name']).'" STYLE="width:125;font-size:11;font-family:verdana;"></NOBR></FORM>';
}
}
else
{
echo 'Kan niet met de server verbinden.';
}
?>
<? $ip = '12.34.56.78'; $port = 27015; $rconpwd = 'hard2guess'; $ping = 25;//miliseconds class SlincherWebRCON { var $_handle; var $_rconpassword; var $_challenge; var $_status = array('hostname'=>'','version'=>'','VAC'=>'','host'=>'','port'=>'','map'=>'','password'=>'','players'=>''); var $_timeout = 50;//50 ms waiting is really long function raw_rcon($string) { return $this->rcon_to_string($this->write_data('rcon '.$this->_challenge.' "'.$this->_rconpassword.'" '.$string)); // most output is chr 108 , hex = 6c , that means that something has been executed } function connect($host,$port,$rconpassword,$timeout=50) { $this->_handle =fsockopen('udp://'.$host,$port); $this->_rconpassword=$rconpassword; $this->_timeout=$timeout; $this->_challenge=$this->challengercon_to_rcon($this->rcon_to_string($this->write_data('challenge rcon'))); } function rcon_to_string($string) { } function challengercon_to_rcon($string) { } function write_data($string ) { $i=0;$gets.=''; { if($i<$this->_timeout) { $gets.=fgets($this->_handle ,2); $i++; } else { return 0; } } $this->_pings[] = $i; $strlen=0; while($strlen<strlen($gets)) { $gets.=fgets($this->_handle ,$togo['unread_bytes']+1); } return $gets; } function get_status() { preg_match('@^l"sv_password" is "([^"]*)"$@',$this->rcon_to_string($this->write_data('rcon '.$this->_challenge .' "'.$this->_rconpassword .'" sv_password')),$pass);$this->_status ['password']=$pass[1];unset ($pass); $raw = explode("\n",$this->rcon_to_string($this->write_data('rcon '.$this->_challenge .' "'.$this->_rconpassword .'" status'))); foreach($raw as $num=>$temp) { if(preg_match('#^lhostname[ ]*: (.*)$#',$temp,$temp)) { $this->_status['hostname'] = $temp[1]; } } foreach($raw as $num=>$temp) { if(preg_match('#^version[ ]*: ([^ ]+ [0-9]+) (.+)$#',$temp,$temp)) { $this->_status['version'] = $temp[1]; $this->_status['VAC'] = $temp[2]; } } foreach($raw as $num=>$temp) { if(preg_match('#^tcp/ip[ ]*: (.+):(.+)$#',$temp,$temp)) { $this->_status['host'] = $temp[1]; $this->_status['port'] = $temp[2]; } } foreach($raw as $num=>$temp) { if(preg_match('#^map[ ]*: (.+) at: [0-9\.]+ x, [0-9\.]+ y, [0-9\.]+ z$#',$temp,$temp)) { $this->_status['map'] = $temp[1]; } } foreach($raw as $num=>$temp) { if(preg_match('#^players[ ]*: ([0-9]+) active \(([0-9]+) max\)$#',$temp,$temp)) { $this->_status ['players'] = array('online'=>$temp[1],'max'=>$temp[2]); } } foreach($raw as $num=>$temp) { if(preg_match('@^#[ ]*[0-9]+[ ]+"([^"]+)"[ ]*([0-9]+)[ ]+([^ ]+)[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+([^ ]+)$@',$temp,$matches)) { $matches[4] = explode(':',$matches[4]);$matches[4] = $matches[4][0]; $this->_players []=array('name'=>$matches[1],'kick_id'=>'#'.$matches[2],'ban_id'=>$matches[3],'ip'=>$matches[4]); } } } } $RCON = new SlincherWebRCON(); $RCON->connect($ip,$port,$rconpwd,$ping); if($RCON->_challenge) { if($_FILES['postconfig']) { foreach($contents as $n=>$row) { $row=trim($row," \t\n\r\0\x0B;"); $i=0; $open=2; while($i<strlen($row)) { if($row{$i} == '"') { if($open==1) { $open=2; } elseif($open==2) { $open=1; } } elseif($row{$i} == ';') { if($open==2) { $row{$i} = "\n"; } } $i++; } { foreach(explode("\n",$row) as $cmd) { { } $clean[] = $cmd; } } } foreach($clean as $exec) { $q = $RCON->raw_rcon($exec); if($q) { } } echo '<BR><BR>Config is uitgevoerd.'; } if($_POST['say']) { if($q{0} == 'l') { echo '<LI> Chat is uitgevoerd.<BR><BR>'; } else { echo '<LI> Chat is <B>niet</B> uitgevoerd.<BR><BR>'; } } if($_POST['rawrcon']) { if($q{0} == 'l') { echo '<LI> RCON Commando is uitgevoerd.<BR><BR>'; } else { echo '<LI> RCON Commando is <B>niet</B> uitgevoerd.<BR><BR>'; } } if($_POST['restartround'] == '1') { $q = $RCON->raw_rcon('sv_restartround 1'); if($q{0} == 'l') { echo '<LI> RestartRound is uitgevoerd.<BR><BR>'; } else { echo '<LI> RestartRound is <B>niet</B> uitgevoerd.<BR><BR>'; } } if($_POST['hostname']) { $q = $RCON->raw_rcon('hostname "'.stripslashes($_POST['hostname'].'"')); if($q{0} == 'l') { echo '<LI> Hostname is veranderd.<BR><BR>'; } else { echo '<LI> Hostname is <B>niet</B> veranderd.<BR><BR>'; } } if($_POST['password']) { $q = $RCON->raw_rcon('sv_password "'.stripslashes($_POST['password'].'"')); if($q{0} == 'l') { echo '<LI> Wachtwoord is veranderd.<BR><BR>'; } else { echo '<LI> Wachtwoord is <B>niet</B> veranderd.<BR><BR>'; } } if($_POST['changelevel']) { $q = $RCON->raw_rcon('changelevel '.stripslashes($_POST['changelevel'])); echo 'De server zal niet reageren, omdat de map gewisseld word.'; } if(($_POST['player_action'] == 'kick') AND $_POST['kick_id']) { $q = $RCON->raw_rcon('kick '.stripslashes($_POST['kick_id'])); if($q{0} == 'l') { echo '<LI> Kick is uitgevoerd.<BR><BR>'; } else { echo '<LI> Kick is <B>niet</B> veranderd.<BR><BR>'; } } elseif(($_POST['player_action'] == 'id_ip_ban') AND $_POST['ban_id'] AND $_POST['ban_ip']) { $RCON->raw_rcon('writeid'); $RCON->raw_rcon('writeip'); if($q{0} == 'l') { echo '<LI> SteamID&IP-Ban is uitgevoerd.<BR><BR>'; } else { echo '<LI> SteamID&IP-Ban is <B>niet</B> veranderd.<BR><BR>'; } } elseif(($_POST['player_action'] == 'id_ban') AND $_POST['ban_id']) { $RCON->raw_rcon('writeid'); if($q{0} == 'l') { echo '<LI> SteamID-Ban is uitgevoerd.<BR><BR>'; } else { echo '<LI> SteamID-Ban is <B>niet</B> veranderd.<BR><BR>'; } } elseif(($_POST['player_action'] == 'ip_ban') AND $_POST['ban_ip']) { $RCON->raw_rcon('writeip'); if($q{0} == 'l') { echo '<LI> IP-Ban is uitgevoerd.<BR><BR>'; } else { echo '<LI> IP-Ban is <B>niet</B> veranderd.<BR><BR>'; } } $RCON->get_status(); echo '<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 STYLE="font-family:verdana;font-size:12"><TR><TD>#Info</TD><TD> </TD></TR>'; echo '<TR><TD>protocol-versie</TD><TD> '.$RCON->_status ['version'].'</TD></TR>'; echo '<TR><TD>VALVe Anti Cheat</TD><TD> '.$RCON->_status ['VAC'].'</TD></TR>'; echo '<TR><TD>Hostname:Port</TD><TD> '.$RCON->_status ['host'].':'.$RCON->_status ['port'].'</TD></TR>'; echo '<TR><TD>Map</TD><TD> '.$RCON->_status ['map'].'</TD></TR>'; echo '<TR><TD>Players</TD><TD> '.$RCON->_status ['players']['online'].'/'.$RCON->_status ['players']['max'].'</TD></TR>'; echo '</TABLE></FONT><BR>'; echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=SUBMIT VALUE="Refresh" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>'; echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=HIDDEN NAME="restartround" VALUE=1><INPUT TYPE=SUBMIT VALUE="Restart Round" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>'; echo '<FORM enctype="multipart/form-data" ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=FILE NAME="postconfig" VALUE=1><INPUT TYPE=SUBMIT VALUE="Upload Config!" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>'; echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=TEXT VALUE="say [WEB-RCON door Slincher!]" STYLE="width:125;font-size:11;font-family:verdana;" NAME="rawrcon"><INPUT TYPE=SUBMIT VALUE="RCON Commando" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>'; echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=TEXT STYLE="width:125;font-size:11;font-family:verdana;" NAME="say"><INPUT TYPE=SUBMIT VALUE="Chat!" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>'; echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=TEXT VALUE="'.$RCON->_status ['hostname'].'" STYLE="width:125;font-size:11;font-family:verdana;" NAME="hostname"><INPUT TYPE=SUBMIT VALUE="Verander Hostname" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>'; echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><INPUT TYPE=TEXT VALUE="'.$RCON->_status ['password'].'" STYLE="width:125;font-size:11;font-family:verdana;" NAME="password"><INPUT TYPE=SUBMIT VALUE="Password" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>'; echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><SELECT NAME=changelevel STYLE="width:125;font-size:11;font-family:verdana;">'; $maps=array('de_nuke','de_dust2','de_inferno','de_cpl_mill','de_cbble','de_dust','aim_ak-colt'); foreach($maps as $map) { echo '<OPTION VALUE="'.$map.'">'.$map.'</OPTION>'; } unset($maps);unset ($map); echo '</SELECT><INPUT TYPE=SUBMIT VALUE="Verander Map" STYLE="width:125;font-size:11;font-family:verdana;"></FORM>'; echo '<BR><B>Spelers:</B><BR>'; foreach($RCON->_players as $player) { echo "\r\n".'<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD=POST><NOBR><INPUT TYPE=HIDDEN NAME=kick_id VALUE="'.$player['kick_id'].'"><INPUT TYPE=HIDDEN NAME=ban_id VALUE="'.$player['ban_id'].'"><INPUT TYPE=HIDDEN NAME=ban_ip VALUE="'.$player['ip'].'"><SELECT STYLE="width:125;font-size:11;font-family:verdana;" NAME="player_action"><OPTION VALUE="kick">Kick</OPTION><OPTION VALUE="id_ip_ban">SteamID&IP Ban</OPTION><OPTION VALUE="id_ban">SteamID Ban</OPTION><OPTION VALUE="ip_ban">IP Ban</OPTION></SELECT><SELECT STYLE="width:125;font-size:11;font-family:verdana;" NAME="ban_time"><OPTION VALUE="0">permanent (Ban Only)</OPTION><OPTION VALUE="1">1 minuut (Ban Only)</OPTION><OPTION VALUE="5">5 minuten (Ban Only)</OPTION><OPTION VALUE="30">half-uur (Ban Only)</OPTION><OPTION VALUE="60">1 uur (Ban Only)</OPTION><OPTION VALUE="240">4 uur (Ban Only)</OPTION><OPTION VALUE="1440">1 dag (Ban Only)</OPTION><OPTION VALUE="4320">3 dagen (Ban Only)</OPTION><OPTION VALUE="10080">1 week (Ban Only)</OPTION><OPTION VALUE="43200">1 maand (Ban Only)</OPTION><OPTION VALUE="525600">1 jaar (Ban Only)</OPTION></SELECT><INPUT TYPE=SUBMIT VALUE="'.htmlspecialchars($player['name']).'" STYLE="width:125;font-size:11;font-family:verdana;"></NOBR></FORM>'; } } else { echo 'Kan niet met de server verbinden.'; } ?>
heb ik gevonden bij script site maar die werkt wel gewoon met die udp functie dus ik vind het behoorlijk vaag |