New XMLSocket();

Im VERY new to Flash/ActionScript…

Im making something similar to this:
http://www.kirupa.com/developer/flash8/php5sockets_flash8.htm

Do i need to have a PHP setup to send and receive data from two separate IPs using XMLSockets?
If so:
What other function could i use to connect two IPs? (Code snipplet please :))
If not:
How would i connect the two IPs? (Code snipplet please :))