I understand the following...you have a command for the players which they can use to store their names on a webpage!?
You need a php-page or something similar which receives the data you send through the socket..
But to be honest is don't know how to do sockets and stuff..
Doesn't this code work? it looks correct!?..0o