Replace problem
Jeg har fået stykke rcon script til en cs server, men når jeg ber den om at skifte hostname, og det indeholder fx. # tar den det som kommentar.foreach( $this->ServerList AS $Key => $Value ) {
$this->Server['ServerID'] = $Key;
$this->Server['ServerIsSelected'] = true;
$this->Server['ServerIsAvailable'] = true;
$this->Server['IP'] = $this->ServerList[$Key]['IP'];
$this->Server['Port'] = $this->ServerList[$Key]['Port'];
$this->Server['RconPassword'] = $this->ServerList[$Key]['RconPassword'];
$this->Halfc->Server['RconID'] = '';
$this->openServer();
$Result = $this->Halfc->executeRconCommand( 'hostname' );
$this->closeServer();
preg_match( "/\"hostname\" is \"([^\"]+)\"/", $Result, $Matches );
$Hostnames[$Key] = $Matches[1];
$this->ServerList[$Key]['Hostname'] = $Matches[1];
}
Hvordan gør jeg så den tillader alle tegn ?
