Re: Streaming
| From: | Justin Patrin | Date: | Mon, 28 Jun 2004 05:40:38 +0000 |
| Subject: | Re: Streaming | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189130@lists.php.net to get a copy of this message | ||
On Fri, 25 Jun 2004 09:07:16 -0500, Stephen Craton
<webmaster@melchior.us> wrote:
>
> What I'm basically trying to do is make the database display out the
> information from it's tables as soon as it possibly can without the need for
> refreshing. For example:
>
> Someone enters in some text, and it's put into the database. As soon as
> possible, the text is shown in a page that wasn't refreshed and has been
> shown at all times, on several computers. They don't all have to be
> synchronized, just that it shows as soon as it possibly can without
> refreshing.
>
> This may be an HTTP push method, the name sounds similar to what I'm trying
> to do. What exactly is it and how do you utilize it?
Let me say this very clearly. Getting the data to the user *as soon
as* it's entered into the DB is impossible unless you:
1) Have a PHP script which never ends and is constantly asking the DB
for more data (this is very server resource intensive and it a *bad
idea*)
2) Write a client program that does *not* rely on the web browser. You
can use Java to make it load in the browser, but then it wouldn't be
PHP.
IMHO, your *only* bet to do this elegantly *with* PHP is to use some
JS. Have a hidden iframe that the JS reloads every x seconds. The JS
reads the data in the iframe and outputs new data to the user's
screen. The user's page itself will never refresh.
>
> Thanks for all the help!
>
> Thanks,
> Stephen Craton
> http://www.melchior.us
>
>
>
> -----Original Message-----
> From: Curt Zirzow [mailto:php-general@zirzow.dyndns.org]
> Sent: Friday, June 25, 2004 12:53 AM
> To: PHP List
> Subject: Re: [PHP] Streaming
>
> * Thus wrote Stephen Craton:
> > So my question is, does anyone know how the phpOpenChat system works?
> > Can anyone provide some insight into the world of "streaming" and
> > avoiding the refresh game?
>
> "streaming"
> <?php
> echo "data streamed to browser";
> ?>
>
> It is very unclear how you mean streaming, if you're talking about a HTTP
> push method, then thats a whole nother ballpark.
>
> Curt
> --
> First, let me assure you that this is not one of those shady pyramid schemes
> you've been hearing about. No, sir. Our model is the trapezoid!
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> !DSPAM:40dc2fb093156210560580!
>
>
--
paperCrane --Justin Patrin--