PDA

View Full Version : XML Sockets


sunlis
03-23-2010, 04:34 AM
I've been having nothing but trouble trying to make a simple chat app...

First I tried using Red5, but after a few hours of wasted time I discovered that my host doesn't support Java apps. No more red5.
Then I came accross smartfox, but the free version only allows 50 connection. Goodbye smartfox.

Then I remembered, a long time ago, I had read about XML Sockets. Seemed like a pretty easy thing to do, I mean there are tutorials everywhere, right?

After going through a few different tutorials (no success yet), I come stumbling back to a place that's always given me answers: as.org *cue trumpets*

The latest of the tutorials I've tried to follow is here http://www.kirupa.com/developer/flash8/php5sockets_flash8.htm

I have SSH access to my host, so that I can start up the socket.php file (php -f socket.php), and that seems to work fine (if I check the process manager in my cpanel, I can see it running). But I can't connect to it.
My socket.php file is listening for calls in port 9876 to sunlis.ca (my domain), and the flash file is trying to connect to sunlis.ca at port 9876. Problem is, I haven't even been able to get them to connect yet.

I would post my code, but I'm just working with exactly what they have in the link I provided above, so I see no point in that.

I've also edited my crossdomain.xml to allow for connections on that port.

Any useful links or comments that will point me in the right direction?

sneakyimp
03-25-2010, 12:48 AM
http://flashmog.net/docs/tutorial_chat.php