Re: [PHP4BETA] Binary for UDP?

From: Date: Thu, 02 Mar 2000 16:05:06 +0000
Subject: Re: [PHP4BETA] Binary for UDP?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-11341@lists.php.net to get a copy of this message
Yes, it does work, however it is not "BINARY-SAFE". It should return binary info captured in a variable so I can plug that into unpack and read my info then display it on the screen however I like. I have already written a perl version and have it completed, unfortunately the website that will use it, absolutely refuses to use PERL. :( Thanks, Ian. Working Example: ---------------- <?php $maxlen = 1024; $default_host = "171.64.75.234"; $default_port = "28001"; $connection = fsockopen("udp://".$default_host, $default_port, &$errno, &$errstr, 5); if(!$connection) { echo "$errstr ($errno)<br>\n"; } else { $msgsend = "bah"; fputs($connection, $msgsend); $msgrecv = fgets($connection, $maxlen); } fclose($connection); ?> On Thu, 2 Mar 2000, Sascha Schumann wrote: > On Thu, Mar 02, 2000 at 10:52:13AM -0500, Ian Redden wrote: > > Has any progress been made adding binary UDP support to php4? > > Are you sure that UDP is working at all? I.e. do simple "foobar" > messages work? > > - Sascha >

« previous php.version4 (#11341) next »