JacquesLemaire Posted November 24, 2012 Share Posted November 24, 2012 Hello, I'm trying to write a client udp socket, but i have difficulties to understand how to do it and the documentation on Internet is not really clear... Can somebody help me? Quote Link to comment https://forums.phpfreaks.com/topic/271120-udp-client-socket/ Share on other sites More sharing options...
Andy123 Posted November 24, 2012 Share Posted November 24, 2012 I haven't actually done socket programming in PHP myself, but the documentation seems to have all the information you need to get started. The first place you want to look is probably at socket_create, unless you have to code the receiver part of things too. You should be able to create an UDP socket connection like this: $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); I did a quick Google search and found this topic that may serve as inspiration. I didn't look it through, so I cannot vouch for the quality of the article. Anyways, a good starting point would be the first link I posted, so here it is again: http://www.php.net/manual/en/ref.sockets.php Good luck! Quote Link to comment https://forums.phpfreaks.com/topic/271120-udp-client-socket/#findComment-1394857 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.