Port 7766 does not work for me either.... I just tried it.
OK. Attempting to connect to '18.104.22.168' on port '80'...OK. Sending HTTP HEAD request...OK. Reading response: Closing socket...OK.
Yes, now it works. But somehow what I did in connecting to port 7766 on my real site worked on my localhost, but not in the live environment anymore. I'm not sure how I can port the positive result we just got over to my site...
Hm, interesting the port should be a problem! I would have never thought to test that. We are somewhat limited in our choices though: (Copied and pasted from a PHP sockets with Flash tutorial):
Anytime you need to have Flash connect to any port, you must have the port equal to or higher than 1024. This is a default precaution Flash takes to ensure connections are not crossing with other ports such as 21, 24, or 80.
The thing is (I think) is that in this case if you are useing php to connect then you are stepping outside of Flash. I could be wrong about that. I am really skecthing on my knowledge in this area.
That's fine... I have Flash at the client side talk to PHP on the server side. Both sides need to be told what port they want to communicate on, and then things can go from there. BTW, I just uploaded it with port 1024 instead of 7766 used. Still the same result (none).
I just not sure what the answer is here. You said that it worked on your local machine. Does that mean that the php file was on your server but the flash file was not uploaded to your server and you where running it from your local machine?
Well, you just can't develop a web application on a web server alone. You could, but you'd have to upload both the Flash client and the PHP host every time something changed in order to test the system. Quite cumbersome. So, I have installed an Apache Web server on my laptop. I access my Apache shell and start the PHP script, and load the Flash page into my Web browser. It's like surfing on the internet, except you're surfing on your own computer. It works there.
Then I ported my site to WestHost- Meaning I installed the database needed, granted user permissions for it, changed the addresses from "localhost" to my new site in the code in both Flash and PHP and what do you know, it's not working anymore.
Ok I understand. Sorry it took some time for me to reply. I was trying to create a test Flash from a tutorial that connects to sockets to give things a try. So far I am getting the same results as you are.
I have to get going to work here pretty soon so don't know how long I can stick around and play with this but it is something I am interested in so I am sure I well come back to it and see if I can get it to work. It may be that someone else well come along and be able to come up with some helpfull stuff before I do. Hope you well let me know if you get it working before I can get back to it.
BTW I am useing this tutorial for the Flash test I am setting up in case anyone else wants to give it a whirl. http://www.kirupa.com/developer/flas...ets_flash8.htm
That is a good tutorial. I started with that as well :-) Getting a chat going teaches you 90% of what you need to know about PHP sockets.
Shawn, thanks for your help so far- we may not have solved anything yet, but I appreciate the time you've put in. If you're looking deeper into FLash/PHP/Sockets, don't hesitate to drop me a note, maybe I can be of some help for you as well.
Anybody else- this one is still up to be solved :-) Got ideas?