Hi erstemal.
Bin in PHP nicht gerade der Held und habe von nem Freund ein Webtool bekommen was er für mich geschrieben hat, doch leider klappt es nicht
Die index.php:
PHP
<?php
@$sid = $_GET['id'];
switch($sid)
{
case 1:
include('conf/server1.php');
echo '<font color="green">Einstellungen für '.$ip.':'.$port.' wurden erfolgreich geladen</font>';
$loaded = "1";
break;
}
?>
<?php
if ($loaded = ""){
echo '<font color="red">Keine Config geladen</font>';
}
?>
<form action="" method="POST">
<font color="blue" size="3">Befehl: <br><select name="command">
<option>bigtext</option>
<option>say</option>
<option>kick</option>
<option>map_restart</option>
<option>reload</option>
<option>map</option>
<option>g_nextmap</option>
<option>exec</option>
<option>g_gear</option>
<option>g_gravity</option>
<option>set g_matchmode</option>
<option>set g_password</option>
<option>set g_gametype</option>
<option>set g_teamnamered</option>
<option>set g_teamnameblue</option>
<option>set g_RoundTime</option>
<option>set g_maxrounds</option>
<option>set sv_joinmessage</option>
</select><br>
<font color="blue">Wert<font><br>
<input type="text" name="wert"><br>
<input type="submit" value="Senden"><br>
<?php
@$value = $_POST['wert'];
@$command = $_POST['command'] . $value;
$timeget = time();
$uhrzeit = date("H:i:s",$timeget);
@$pro = "$uhrzeit: $command";
?>
<?php
$angriffe= "1";
for($i=0; $i<$angriffe; $i++) {
@$sock = fsockopen("udp://$ip","$port");
sleep(5);
@fputs($sock, "\xFF\xFF\xFF\xFFrcon \"" . $rcon_pass . "\" " . $command);
}
if ($ip == ""){
exit;
}
else{
echo '<font color="green" size="5">Deine Eingabe:<br>'.$command.'<br></font>';
}
echo fread($sock, 5000000);
@fclose($sock);
?>
<?php
$fh = fopen('protokoll.txt', 'a');
fwrite($fh, "$pro\r\n");
?>
Alles anzeigen
Und hier die server1.php:
Ich steig bei PHP nicht durch
Ich bräuchte das tool echt dringend^^
Wie erwähnt sollte es für Urban Terror (4.1.1) sein.
Webserver ist ein Apache mit der aktuellsten PHP
Betriebssystem ist Debian 6 auf nem HP Proliant ML 370 G3 Server den ich hier stehen habe.
Irgendwie will das Ding nicht! Weder hier im Netz selbst, als auch zu ner anderen Root Maschine im RZ DUS2.
Kann mir jemand helfen ?
Danke vielmals im Vorraus!