473,326 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

idea needed: Longrunning PHP-script/continious stream/browser 'pagerenew'

Hi,

I have a little problem figuring out something that solves the folowwing
problem:
1) 1 script that can run for many hours (days).
It will output regulary some information.
2) A browser that displays it.

So the browser will receive a stream of information over hours, and the php
script will output it (using flushing probably to make sure the browser
knows the stream is still alive.)

Ideally I would like to give the browser some command to throw away all the
old output to keep it fast and not having megabytes of info on the page.

But that means a new http-request, which doesn't suit my needs.

AFAIK this is not possible, but if it is possible somehow, please tell me.
If you think it is completely impossible, also please tell me. :-)

Thanks for your time.

Kind regards,
Erwin Moller
Mar 31 '06 #1
3 1375
Erwin Moller wrote:
Hi,

I have a little problem figuring out something that solves the folowwing
problem:
1) 1 script that can run for many hours (days).
It will output regulary some information.
2) A browser that displays it.

So the browser will receive a stream of information over hours, and the php
script will output it (using flushing probably to make sure the browser
knows the stream is still alive.)

Ideally I would like to give the browser some command to throw away all the
old output to keep it fast and not having megabytes of info on the page.

But that means a new http-request, which doesn't suit my needs.

AFAIK this is not possible, but if it is possible somehow, please tell me.
If you think it is completely impossible, also please tell me. :-)

Thanks for your time.

Kind regards,
Erwin Moller

Why not buffer the output at the backend (file or database) and then let
the browser refresh on a cyclic basis?

-david-

Mar 31 '06 #2

Erwin Moller wrote:
I have a little problem figuring out something that solves the folowwing
problem:
1) 1 script that can run for many hours (days).
It will output regulary some information.
2) A browser that displays it.


The script could save its output to a file, which is repeatedly loaded
by a browser. Javascript can be used to refresh the page once in a
while.

Alternatively, you can make a Java applet which receives the data on a
socket.

Mar 31 '06 #3
Sjoerd wrote:

Erwin Moller wrote:
I have a little problem figuring out something that solves the folowwing
problem:
1) 1 script that can run for many hours (days).
It will output regulary some information.
2) A browser that displays it.


The script could save its output to a file, which is repeatedly loaded
by a browser. Javascript can be used to refresh the page once in a
while.

Alternatively, you can make a Java applet which receives the data on a
socket.


Thanks David and Sjoerd,

I think storing the 'parts' (I want to spit out to HTML) in the database
with some time-index, which I poll from the client (using JS) is indeed a
good solution.
It gives me the flexibility to retrieve some pieces from the 'past' too in
the browser.
Easy actually, once you think of it. :-)

Thanks for your prompt responses!

Regards,
Erwin Moller
Mar 31 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: BT | last post by:
Hi, I am trying to install php-mysql-4.0.6-7.i386.rpm(to get php to work with mysql as suggested for my earlier error). I get the following error for rpm -i php-mysql-4.0.6-7.i386.rpm. Error...
50
by: 127.0.0.1 | last post by:
With all the problems with having register_globals = on, I propose the following idea: We define register_globals_manual = on as a new configuration default. What this does is enable 3 new...
7
by: James | last post by:
I am currently working on a PHP based website that needs to be able to draw from Oracle, MS SQL Server, MySQL and given time and demand other RDBMS. I took a lot of time and care creating a...
1
by: Positive Contrarian | last post by:
Am looking for a sort of a forum. What's different is that all postings would have one or more addressees, and postings wd be visible only to them and the originator. Unthreaded is OK. (No, mail...
3
by: morty | last post by:
Heloo I'm starting project.First stage is for my school work, but i want to develop it to the end. I want to create a ERP based on php for small company's I want to use as many as possible...
4
by: Jordan Marton | last post by:
Hi, I spent the entire weekend struggling to find a suitable tempalte solution for my site. Yes, user controls were good, but I needed one page that could control user controls on each adn every...
54
by: sam.s.kong | last post by:
Hi! I've been programming ASP for 5 years and am now learning PHP. In ASP, you can use GetRows function which returns 2 by 2 array of Recordset. Actually, it's a recommended way in ASP when you...
28
by: Ian Davies | last post by:
Hello I would appreciate some help from someone who has knowledge of working with css, php javascript and how they interact. Ive been working on a task for the last few days and have started to...
3
by: jamesjames | last post by:
Hello i'm just curious what you think about this: i want to start a longrunning method in a MainForm then show a modal dialog box with progressbar on in (which show operation progress, as you can...
1
by: Joel Fireman | last post by:
Help Needed: Upgrade Fedora 4 / Apache 2 to PHP 5.2.x from 5.0.4 I've been testing Joomla as a content manager for the County offices, and it looks pretty good. Unfortunately, I decided to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.