Re: Text Streaming in PHP

From: Date: Tue, 01 Jun 2004 01:45:57 +0000
Subject: Re: Text Streaming in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187316@lists.php.net to get a copy of this message
On 05/31/2004 04:28 PM, Stephen Lake wrote:
I know I asked this before a couple of weeks ago, but I need a good swift kick in the right direction :D I need to know how to do a text stream in PHP. I have tried the following: while loop with flush and sleep functions HTTP/1.1 Connection: Stream (seems to work in the above while loop until you post something then its like it stalls completely) Are there any other ways? I was looking at GTChat lastnight and it mentioned about sending a file "line by line" to achieve a server push like effect....anyone know how to do this? Only way I will consider Java is if it will stream a HTML page and someone can point me in a direction to grab one Any help in the above questions would be greatly appreciated.
I think you just need to use Keep Alive connections and use PHP flush command to stream the text. You may also want to try this class to create chat channels: Class: Chat http://www.phpclasses.org/mydbchat -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html

« previous php.general (#187316) next »