Page 1 of 1

UDP port question...?

Posted: Wed Oct 15, 2008 12:34 am
by 0perand
I am sending out udp packets at port 1900. I am using a packet sniffer to monitor the actual network activity. The information from the packet sniffer shows that the UDP packets are sent out a random ports in the 50000s and it goes to the correct ip address and port.

My question is... How can you find out what port the udp packets were sent on?

Here is the basic code:

Code: Select all

 
$Socket = socket_create(AF_INET,SOCK_DGRAM,SOL_UDP);
socket_set_option($Socket,SOL_SOCKET, SO_REUSEADDR, 1);
socket_bind($Socket,$IP_Address,$Port);
socket_sendto($Socket,$soap_out,strlen($soap_out),0,$IP_Address,1900);
 
I am not an expert by any means... So long explanations will help! Thanks!

Re: UDP port question...?

Posted: Wed Oct 15, 2008 2:47 am
by requinix

Re: UDP port question...?

Posted: Wed Oct 15, 2008 10:16 am
by 0perand
*** SOLVED ****

Thanks man works like a charm! Im an idiot for not finding it on my own lol.