|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-03-03 14:47 UTC] sas at cvs dot php dot net
[2000-09-04 19:46 UTC] sniper@php.net
[2000-10-02 19:05 UTC] sniper@php.net
[2000-10-02 22:09 UTC] sniper@php.net
[2000-10-02 22:09 UTC] sniper@php.net
[2000-10-12 08:05 UTC] sniper@php.net
[2000-10-30 10:50 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
I am using a UDP socket routine. fgets does not seem to be binary safe and you cant seem to use fread or fwrite which are two commands which are binary safe. <?php $maxlen = 1024; $default_host = "128.143.204.90"; $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); } echo $msgrecv; fclose($connection); ?> goto http://www.clanhosting.net/packet.doc for the packet query and response packet formats to test my demo. I have played with this for hours and it just doesnt seem to be binary safe. Am I doing something wrong???