Lo,

I'm trying to make a script that gets details of a game, half-life, running on a server to do this i have to write to port and read back the data each peiece of info is seperated by the null char x00 however if i try to read more than 90 the script hangs and times out. Not as in a normal too long to execute but the error box pops up in IE saying it time out and connection with server is reset. Yet the server send more than 90 chars if i put in a loop with only reading 80 at a time it still hangs there 14 pieces of info the server returns. I intend to display this info in a HTML file but first i have to get it!

if you dont uderstand my explantion but think u can help email me or replky and ill try to explain it more.

heres the code:

<?PHP

$fp = fsockopen("udp://193.82.159.232", 27015, &$errno, &$errstr);
if (!$fp)
{
echo "ERROR: $errno - $errstr<br>n";
}
else
{
fwrite($fp,"˙˙˙˙detailsx00");
$got = 0;
while($got != 14)
{
$buffer = fread($fp, 80);
$place = 5;
$found = 0;
while($found != 1)
{
if($buffer[$place] == "x00")
{
$found = 1;
}
else
{
$details[$got] .= $buffer[$place];
$place++;
}
}
print(" $details[$got] ");
$got++;
}
fclose($fp);
}

?>

thanx in advance.