# Php Socket works on localhost but not on a real domain

**URL:** <https://forum.kirupa.com/t/php-socket-works-on-localhost-but-not-on-a-real-domain/256940>\
**Category:** Uncategorized\
**Created:** [April 9, 2008, 12:22am UTC](https://forum.kirupa.com/t/php-socket-works-on-localhost-but-not-on-a-real-domain/256940 "2008-04-09T00:22:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soul814](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@Soul814](https://forum.kirupa.com/u/Soul814)\
**Post date:** [April 9, 2008, 12:22am UTC](https://forum.kirupa.com/t/php-socket-works-on-localhost-but-not-on-a-real-domain/256940/1 "2008-04-09T00:22:51Z")

</div>

So following this tutorial ([http://www.kirupa.com/developer/flash8/php5sockets\_flash8.htm](http://www.kirupa.com/developer/flash8/php5sockets_flash8.htm)). I have it working on localhost. In the php server script I used the address “127.0.0.1” and in the flash file I changed the socket connect to null (mySocket.connect(null, 9999);), that way it will take the address of whatever the URL is.

Anyways, now I uploaded the same files to two of my domains. One is a third party hosting, while the other is a computer I have set up to be accessible on the web. The socket server seems to be running, yet when I go to the socket page, the connection fails. Any ideas? Is there some security thing I am not aware of?
