Reply to Re: PHP & open connections

Your name:

Reply:


Posted by Jerry Stuckle on 10/02/06 16:47

Lenard Redwood wrote:
> I'd like to create a simple chat application that will leave the
> connection open for a minute and then restart the connection to the
> server to push data. I plan to use temporary .txt files to store
> messages. My question is how can I do that in PHP 5, what techniques
> should I do server-side to keep this connection open and how would be
> the flow of the message? Do I need a different technology such as
> Python to handle messages?
>
> 1. User A sends a message to the server
> 2. ?
> 3. User B receives the message instantly through an open connection
>
> Any tip/link/tutorial would be greatly appreciated.
> Thanks,
>
> Lenard.
>

You can't. HTTP is a pull only protocol. You can use javascript on the
client to pull the info on a regular basis (i.e. every 30 seconds). But
you can't push the data out.

The other alternative is something like a Java applet where you can
maintain a connection.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация