Click to See Complete Forum and Search --> : Will PHP 5 Allow for better Chat?


craig_fly
05-13-2004, 05:16 PM
I know there's some new work done on sockets, a subject which I am very fuzzy on.

But I was wondering if this would allow for a way to avoid using a java applet or a refresh to make a chat room or other cool feature involving that kind of real time interaction.

goldbug
05-13-2004, 05:34 PM
AFAIK, no.

It's still server-side, so that means to get new content, you need to refresh, or use some client-side device.

Shrike
05-13-2004, 07:24 PM
The problem is not really to do with PHP but with using the HTTP protocol I guess.

Weedpacket
05-14-2004, 04:03 AM
Using RPC should be feasible - though that can be done in PHP4 the PHP5 implementation of XML-RPC ought to be more stable (including 5's use of libxml). Which isn't to say XML is necessary for RPC - just a client that can run Javascript.

Napster
06-02-2004, 12:57 PM
with the chat thing use a meta refesh in the chat thing every 30 seconds

Moonglobe
06-02-2004, 07:48 PM
Like Shrike said, there's no reason why PHP 4 couldnt handle real-time chat, it's jsut that there's gotta be a client-side interface, besides the browser. and that means not HTTP. basically any protocol you could think of would work.. just not something defined as stateless, for the transfer of hypertext. chat was never supposed to be an application of HTTP.

freebie
06-06-2004, 01:12 AM
Although there are ways of making server-side calls from javascript, and getting the results (such as using XMLHTTP or "hidden iframes"), I think a good and relatively easy solution would simply be to put the portion of your page that contains the chat interface and results in an iframe, that way, when it gets refreshed, only the iframe portion is refreshed and is that much faster and less noticeable.