Re: Re: UDP Packet Writing

From: Date: Mon, 12 May 2003 12:27:47 +0000
Subject: Re: Re: UDP Packet Writing
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-147293@lists.php.net to get a copy of this message
Wow, thanks. Only one question, what's the "CCLSC*" for? On Thu, 2003-05-08 at 10:44, Hugh Bothwell wrote: > > <?php > > function SendUdpMsg($host, $port, $msg) { > $udp = fsockopen("udp://$host", $port); > fwrite($udp, $msg); > fclose($udp); > } > > function CommandStr($cmd, $ip, $port) { > return pack( > "CCLSC*", > $cmd, > 0, > $ip, > $port, > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 > ); > } > > SendUDPMsg( "127.0.0.1", 8001, > CommandStr(3, ip2long("127.0.0.1"), 8002) > ); > ?> -- Adam Voigt (adam@cryptocomm.com) Linux/Unix Network Administrator The Cryptocomm Group

« previous php.general (#147293) next »