OK, działa. Wielkie dzięki

Jeszcze jedno pytanie:
Gdzie wstawić ip i port w tym skrypcie:
<?php
// PHP ASE parser for Soldat by FliesLikeABrick
// May be used for other games with a few slight modifications
// (mainly removing the part that pretties up the output)
// You are free to use this code for anything you want and redistribute/modify at will
function readASEString($sock,$length = false) {
$length = $length ?
$length : ord
(fread($sock,1
)); return fread($sock,$length-1
); }
function ASE($host,$port) {
readASEString($s);
$info['port'] = readASEString($s);
$info['servername'] = readASEString($s);
$info['ip'] = gethostbyname($host);
$info['mode'] = readASEString($s);
$info['map'] = readASEString($s);
$info['version'] = readASEString($s);
$info['passworded'] = readASEString($s);
$info['numplayers'] = readASEString($s);
$info['maxplayers'] = readASEString($s);
// prime the loop conditional
$lengthstring = fread($s,1
); $length = ord($lengthstring);
// loop through the key/value pairs and set them
while($length != 1) {
$info[readASEString($s,$length)] = readASEString($s);
$lengthstring = fread($s,1
); $length = ord($lengthstring);
}
// this entire section can be removed if you don't use them
$info['survival'] = $info['Survival'] == 'No' ? false:true;
$info['realistic'] = $info['Realistic'] == 'No' ? false:true;
$info['remaining'] = explode(' ',$info['Time Left']); $info['remaining'] = $info['remaining'][0];
$info['minutes'] = explode(':',$info['remaining']); $info['seconds'] = $info['minutes'][1];
$info['minutes'] = $info['minutes'][0];
$info['timelimit'] = explode(' ',$info['Time Limit']); $info['timelimit'] = $info['timelimit'][0];
$info['protected'] = $info['Protected'] == 'No' ? false:true;
// end removable section
$info['players'] = Array(); for($i=0;$i<$info['numplayers'];$i++) {
$info['players'][$i] = Array(); $info['players'][$i]['name'] = readASEString($s);
$info['players'][$i]['team'] = readASEString($s);
$info['players'][$i]['skin'] = readASEString($s);
$info['players'][$i]['score'] = readASEString($s);
$info['players'][$i]['ping'] = readASEString($s);
$info['players'][$i]['time'] = readASEString($s);
}
return $info;
}
?>
O tak?
Oryginał:
$s = fsockopen("udp://$host",$port+123);
Po podstawieniu ip i portu:
$s = fsockopen("udp://blah.selfip.net",23073+123);