I have visited an excellent sight explaining how to construct your own ICMP protocol ‘echo’ request using PHP. The function used for implementing your own protocol in PHP is ‘socket_create()’.
I know that the UDP protocol socket function is already created in PHP but I want to send RTP data packets. So can I have an example on how this could be done using PHP. Take note that UDP is a transport protocol and that RTP is (in more cases than not) considered as an application protocol which sits on top of UDP (or TCP but I want UDP).
Do I need to create my own protocol set i.e. UDP and RTP on top??
Or can I use the UDP sockets already available and send some extra initiall headers to represent RTP? Will that work or will the UDP sockets only pack and unpack the packets as UDP packets only, thus ignoring RTP header and treating them as part of the UDP packet itself…….
Please advise on how to go about achieving this or give example code if they exist and available……