Page 1 of 1
reading text generated by javascript
Posted: Mon Jan 19, 2009 4:01 pm
by 77ball
I know it's possible for other applications like flash or javascript to read data generated by a php page. But is it possible for php to read data generated by javascript? I know about xmlhttp.send, but this is too slow for what I want. They need to be communicating around 30 times a second.
Re: reading text generated by javascript
Posted: Mon Jan 19, 2009 5:06 pm
by requinix
Not really. Look into using Flash to keep an open connection between the client and your server. There can be a JavaScript "interface" so it doesn't all have to be Flash driven.
Don't forget that you're limited by the client's upload speed (and your download speed too of course). 1KB thirty times a second is 30KB which most people can do, but 10KB "packets" are harder. Doesn't sound like that will be an issue though.
Re: reading text generated by javascript
Posted: Mon Jan 19, 2009 6:14 pm
by Burrito
also check out silverlight. It's quite nice for doing things like you need.
Re: reading text generated by javascript
Posted: Mon Jan 19, 2009 10:11 pm
by 77ball
Each transmission to the server will be about 50-75 bytes. Very small. The data being received from the server will likely be about 3-4X that.
In Flash, I know about the XMLSockets, but unfortunately I'm using a shared server and not allowed to use a server socket. I will look into Silverlight, can I get a free trial anywhere?
Thanks for the help everyone. Does anybody know of any other game creation tools like Flash that are capable of setting up a connection between two hosts?
Re: reading text generated by javascript
Posted: Mon Jan 19, 2009 10:21 pm
by Burrito
77ball wrote:...I will look into Silverlight, can I get a free trial anywhere?...
Silverlight is free but you're going to need an IDE to compile your package and visual studio is NOT free. There might be a free alternative to VS, but I don't know of one.