Hi,

> I'm looking for a way to do something, not sure if someone can help me.
>
> I would like to be able to "control", in a way, what a remote user is
> seeing, almost like running a slideshow.
>
> For example, user goes to website, it shows block of text or picture. I
> login to admin area.I click "next" or something, and it either advances to
> another page, or to another picture, and so on.
>
> I know you can kind of do a live output using flush, but what about
> forcing it to another page?

I don't think there's a way that you could force your server to push a
new page onto an end-user's browser.

However, you could replicate the behavior in a potentially annoying way:

* serve up a page that has a meta-refresh of like, 5 or 10 seconds
* that page includes an image, like "foo.jpg"
* in your admin area, when you click "next", it does something to
  'foo.jpg' (symlinks it to a new file, replaces the file, makes foo.jpg
  pull different stuff from a database, whatever)
* next time the browser reloads due to the meta refresh, they see the
  new picture.

It's not perfect, and there may be some cache issues that come into
play.  So you could tie your admin area to session ids, and have the
reloading page have a dynamically determined image name.  This might
sidestep caching issues.

Of course, there won't be immediate feedback to the user.  They will
have to wait a maximum of 5 seconds (or whatever) before they see your
new image.

The point is that you can't talk directly to the browser.  You have to
talk to the server, and then have the client periodically poll the
server to see what new data it should get.

I think.

-- 
[ joel boonstra | [EMAIL PROTECTED] ]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to