php - What is the appropriate value for UDP port? -
i'm creating php script listening incoming data user. idea user able send udp packet remotely browser , show on browser.
the script works fine when tested on localhost using xampp. after uploading script in server, fails bind socket connection everytime. tried port number 50000, 5000, 561, 61 , many others failing.
here's php script, taken php's website...
$socket = socket_create(af_inet, sock_dgram, sol_udp); if ($socket == false) { echo 'socket_create failed'.socket_strerror(socket_last_error())."\n"; } if(!socket_bind($socket, $ip, $port)) { socket_close($socket); echo 'socket_bind_failed'; } socket_recvfrom($socket, $buf, 255, 0, $from, $port);
so, decided known udp port shown here, seems used application. question is, appropriate value udp port?
Comments
Post a Comment