Php/perl socket server

i am a newbie in socket programming. i am trying to set up a socket server for chatting. chat client is web-based using flash’s xmlsocket.

<?php
//
// socket_server.php
//
$address = “localhost”;
$port = 9000;
// create socket, bind socket, etc etc…
?>

when working locally, my flash chat client successfully connected to this socket server via xmlsocket. but when chat client is opened from another computer, how to modify socket_server.php for it to work? i made some naive attempts without success. i do not understand this. what else do i need?

would i be better off with perl?