Thanks, dagon! I will try something else for my problem.
To be clear here's what I want to do:
I've learned a little about MFC sockets and I've managed to do a chat application.
I run the server and my friend connect to me and can talk to each other. The problem is that I have a dynamic ip and I must tell them every time what is it. So every time my server starts he access my site like this (I run iexplorer with my address in the command argument): mysite.com/adress.php?ip=myip. I use the $_GET['ip'] to get the ip and displayed on my site.
What I want now is to make something to tell them when my server is running and when is not, like a status.
Thanks again, bye!