How to do NAT with PHP sockets
I'm trying to make a peer to peer app in php to work in the same kind of way skype works. It works with internal addresses, but when I try to send data to my external address the message never gets there. Obviously I'm missing some address translation, but I'm at a loss for how to do that with PHP sockets. Is it possible? This is the code i have at the moment to receive the message, which I run first to wait for some message: <?php $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) or die("Could not create socket: " . socket_strerror(socket_last_error($socket))); socket_bind($socket, "0.0.0