Re: fsockopen and games
| From: | Andreas Richter | Date: | Fri, 08 Sep 2000 19:52:18 +0000 |
| Subject: | Re: fsockopen and games | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15933@lists.php.net to get a copy of this message | ||
If I am not mistaken... (and I could be)
PHP fsock functions are TCP only... And Quake servers (and HalfLife) work
off UDP connections.
Yes, this was the bug but its possible to make a udp connection:
function t_querry($t_ip,$t_port) {
$t_scon=fsockopen($t_ip,$t_port, &$errno, &$errstr, 30);
if(!$t_scon) return "error($errno): $errstr";
return "ok";
}
echo t_querry("udp://192.168.0.17:27910","0");
U have to use udp:// and add the port at the end.
MFG SMINTMAN