note 97375 deleted from function.socket-recvfrom by googleguy

From: Date: Wed, 24 Oct 2012 13:37:59 +0000
Subject: note 97375 deleted from function.socket-recvfrom by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191519@lists.php.net to get a copy of this message
Note Submitter: rmayo100 at yahoo dot com ---- I said in my previous note that I'd add a secondary post when I found out more about how to use socket_recvfrom(). So here it is. As I suspected, the example given is dead-flat-wrong and should be avoided. You WILL need to use pointers like the description at the top of the page says. My working socket_recvfrom() command looks like this: $bytes = socket_recvfrom ($socket, &$udp_reply, 100, 0, &$from_addr, &$from_port); Also, even if you have no interest in the the information at all, you must create the $from_addr and $from_port variables and pass them by reference. PHP doesn't support passing in NULL just because you might not give a rat's patootie about the information.... ;) R.

« previous php.notes (#191519) next »