Re: [PHP] Progress Bar

2004-05-02 Thread Burhan Khalid
Craig Gardner wrote:

I'm working on a script that will automatically download and burn an ISO 
to a CD, when passed the filename of the ISO and I want to use some sort 
of progress bar to show how much of the download/burn is complete.  I 
was originally going to use wget to download the file, but I don't know 
how to get the progress of the download.  Before the script processes, I 
have the filename and filesize.  Does anyone know of a way to get the 
file to download and give me the percentage of the file downloaded or 
even the filesize of the local copy every couple seconds or so?
http://pear.php.net/package/HTML_Progress

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


[PHP] progress bar for use with PHP uploads

2002-11-12 Thread Kenn Murrah
Greetings 

Can anyone point me in the direction of a Javascript code snippet that would display a 
progress bar for a PHP upload?  I'm sure it can be done that way, but honestly, I lack 
the Javascript skills to make it happen   

Any and all help would be appreciated.

Thanks.

Kenn




Re: [PHP] progress bar for use with PHP uploads

2002-11-12 Thread Ernest E Vogelsinger
At 17:27 12.11.2002, Kenn Murrah spoke out and said:
[snip]
Can anyone point me in the direction of a Javascript code snippet that would 
display a progress bar for a PHP upload?  I'm sure it can be done that way, 
but honestly, I lack the Javascript skills to make it happen   
[snip] 

If I understood you correctly you want to accomplish something like

a) you have a file upload form
b) user clicks upload, and a progress meter is displayed
c) when the upload is done, the progress meter will be at 100% and vanish
or tell finished or something like that

I'm afraid this cannot be done very easily. What you'd need to know at the
moment the user clicks on upload would be the actual filesize, and the
average transmission speed so you can estimate the pace to go from 0 to
100. And, you need both values at the client's, a server side script is not
yet active at this time.

I'd suggest to take the easy road (seen on a couple of other sites)...
Create an animated gif with a progress bar constantly scrolling. In your
form's onSubmit() method (at the client's side!), do a window.open() with
the appropriate parameters to generate a small window without any controls,
sized sufficiently to just contain this gif.

The URL of this popup would be a PHP script (with the same session ID of
the uploader) which would basically do this:

if (!$_SESSION['popup_opened']) {
$_SESSION['popup_opened'] = true;
send_popup_html();
}
elseif (!$_SESSION['xmit_done'])
header('HTTP/1.0 204 No Content');
else send_close_html();

send_popup_html would add a header to refresh the popup:
header('Refresh: 1;
URL=http://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']?SID);

send_close_html would simply send html like
body onload='window.close();'

I hope you get the idea... Basically the crucial stuff is the refresh
header for the popup url that causes the client to _try_ to refresh every
second. As long as the transfer is not finished, the popup script simply
replies with 204 No Content, so the browser would change nothing with the
popup. When the upload is eventually finished, the refresh request
succeeds, but the only stuff the client receives is a javascript closing
the popup...


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



Re: [PHP] progress bar for use with PHP uploads

2002-11-12 Thread 1LT John W. Holmes
There's no way to know the percentage of the file that's uploaded, so you
can't have a true progress indicator. You could just use a little popup that
shows a 'wait, we're doing something' graphic that the following page closes
when it loads.

---John Holmes...

- Original Message -
From: Kenn Murrah [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
Sent: Tuesday, November 12, 2002 11:27 AM
Subject: [PHP] progress bar for use with PHP uploads


Greetings 

Can anyone point me in the direction of a Javascript code snippet that would
display a progress bar for a PHP upload?  I'm sure it can be done that way,
but honestly, I lack the Javascript skills to make it happen 

Any and all help would be appreciated.

Thanks.

Kenn



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




[PHP] Progress bar for uploading files

2002-10-16 Thread Oscar F

Hello,
 
I'm working on a file uploading script, but I need to know if there is a
way to know what's the progress of the file, so I can make la a progress
bar?.. Any ideas? Please?.
 
Thanks in advance.
 
  Oscar F.-



Re: [PHP] Progress bar for uploading files

2002-10-16 Thread Matt

From: Oscar F [EMAIL PROTECTED]
 Sent: Wednesday, October 16, 2002 2:17 PM
 Subject: [PHP] Progress bar for uploading files

 I'm working on a file uploading script, but I need to know if there is a
 way to know what's the progress of the file, so I can make la a progress
 bar?.. Any ideas? Please?.

Extensive discussion on this is at:
http://marc.theaimsgroup.com/?l=php-generalw=2r=1s=progress+barq=b



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




Re: [PHP] Progress bar for uploading files

2002-10-16 Thread Joseph W. Goff

Actually, I don't think you can make a progress bar function correctly for a
file upload.  The file is uploaded before control is ever given to the
script.
- Original Message -
From: Oscar F [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 16, 2002 1:17 PM
Subject: [PHP] Progress bar for uploading files


 Hello,

 I'm working on a file uploading script, but I need to know if there is a
 way to know what's the progress of the file, so I can make la a progress
 bar?.. Any ideas? Please?.

 Thanks in advance.

   Oscar F.-



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




RE: [PHP] Progress bar for uploading files

2002-10-16 Thread Daniel Masson

I needed that once ... I uploaded files using ftp functions .. And then
a pop-up comes checking the size on the remote host .. And comparing
with the size on the local machine, that way a colud make that the pocp
up displays a bar and refreshes every n seconds, displaying the bar with
a longer size everytime.

Cordialmente
Daniel Massón = Ingeniero de desarollo
[EMAIL PROTECTED]
www.imagine.com.co
Tels: (57)(1) 2182064 - 6163218
Bogotá - Colombia

- Soluciones web para internet e intranet
- Asesoría y Soporte Técnico
- Licenciamiento de Software 

 



-Mensaje original-
De: Oscar F [mailto:[EMAIL PROTECTED]] 
Enviado el: miércoles, 16 de octubre de 2002 13:17
Para: [EMAIL PROTECTED]
Asunto: [PHP] Progress bar for uploading files


Hello,
 
I'm working on a file uploading script, but I need to know if there is a
way to know what's the progress of the file, so I can make la a progress
bar?.. Any ideas? Please?.
 
Thanks in advance.
 
  Oscar F.-



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




[PHP] progress bar for a server side process

2002-09-03 Thread electroteque

hi there i have created a script to regenerate thumbnails for a photo
gallery , i have changed my code to use gd true color although it takes
forever now , i have it generating 20 at a time then doing the rest but
still takes forever , i know its impossible to generate a true progress bar
for image uploads via a browser but how about server side processes ?



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




Re: [PHP] progress bar for a server side process

2002-09-03 Thread Marek Kilimajer

I've got a nice progress bar with this code:

for($i=0;$i10;$i++) {
flush();
sleep(1);
echo 'img src=img.gif width=20 height=20 border=0 alt=X';
}

But read manual for the flush() function.

electroteque wrote:

hi there i have created a script to regenerate thumbnails for a photo
gallery , i have changed my code to use gd true color although it takes
forever now , i have it generating 20 at a time then doing the rest but
still takes forever , i know its impossible to generate a true progress bar
for image uploads via a browser but how about server side processes ?



  



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




[PHP] progress bar for uploading files

2002-08-16 Thread electroteque

hi guys i was wondering if there was anyway to have a progress bar for
uploading images ?



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




Re: [PHP] progress bar for uploading files

2002-08-16 Thread Peter J. Schoenster

On 16 Aug 2002 at 23:40, electroteque wrote:

 hi guys i was wondering if there was anyway to have a progress bar for
 uploading images ?

TMTOWDI, but here is a way I did something similar. I was spidering remote sites and 
to get user's data and store in a database and the user could not continue until 
the spider spun it's web.

I accpeted the data I needed and then returned a page with the HTTP-REFRESH tag in it 
with something like this

meta http-equiv=Refresh content=10; 
URL=http://yoursite.com/verify_upload?process_id=Xamp;action=check_uploadamp;timer=X
 

So it refreshes every 10 seconds and checks to see if process X  has finished, if so 
then redirect to the next step,  if not then just return but upgrade the timer so you 
can increase your counter (perhaps a percentage in a table cell).


Peter





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




[PHP] progress bar

2002-08-12 Thread Serdar Sokmen

Hi,

I would like to add a progress bar to an installtion program I'm writing in
PHP. I basically have one function that I call, it takes about 30 seconds or
so to finish executing... I haven't done such a thing before. Can anyone
plese suggest me some ideas...

Many Thanks

Serdar



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




Re: [PHP] progress bar

2002-08-12 Thread Justin French

Unless you can break the process up into a series of smaller process' (and
use meta refresh's or javascript redirects to step through each process),
you're out of luck... because the browser can't possibly know what's
happening in the background on the server.

For a cheap and nasty solution, how about an animated GIF that lasts about
40 or 50 seconds? It can start empty, and animate up to full... as long as
the process finishes before the GIF, all will be well.


Justin French



on 12/08/02 8:05 PM, Serdar Sokmen ([EMAIL PROTECTED]) wrote:

 Hi,
 
 I would like to add a progress bar to an installtion program I'm writing in
 PHP. I basically have one function that I call, it takes about 30 seconds or
 so to finish executing... I haven't done such a thing before. Can anyone
 plese suggest me some ideas...
 
 Many Thanks
 
 Serdar
 
 


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




RE: [PHP] progress bar

2002-08-12 Thread Tom Kohnen

Hi!
Well i suppose flush() is useful in your case, flush out the output whenever
it is called, and not when the page is fully generated (the usual case)!
Sou you might to sth like this:

- Print 1/4 of the progress bar
- flush
- wait some time
- print 2/4 of the progress bar
- flush


i don't know if it works, but that's the way it'd do it ;)

- Tom

-Original Message-
From: Serdar Sokmen [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 12, 2002 12:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] progress bar


Hi,

I would like to add a progress bar to an installtion program I'm writing in
PHP. I basically have one function that I call, it takes about 30 seconds or
so to finish executing... I haven't done such a thing before. Can anyone
plese suggest me some ideas...

Many Thanks

Serdar



--
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




RE: [PHP] progress bar

2002-08-12 Thread Dan Hardiker

To make it look that little bit nicer, you could use flash to display the
bar... but I think that make take a little longer than you'd like for
development.

 Hi!
 Well i suppose flush() is useful in your case, flush out the output
 whenever it is called, and not when the page is fully generated (the
 usual case)! Sou you might to sth like this:

 - Print 1/4 of the progress bar
 - flush
 - wait some time
 - print 2/4 of the progress bar
 - flush
 

 i don't know if it works, but that's the way it'd do it ;)

 - Tom

 -Original Message-
 From: Serdar Sokmen [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 12:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] progress bar


 Hi,

 I would like to add a progress bar to an installtion program I'm writing
 in PHP. I basically have one function that I call, it takes about 30
 seconds or so to finish executing... I haven't done such a thing before.
 Can anyone plese suggest me some ideas...

 Many Thanks

 Serdar



 --
 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


-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software  Systems Engineer
First Creative Ltd



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




Re: [PHP] progress bar

2002-08-12 Thread lallous

I agree with the flush() solution.

In addition, output a javascript code to update the display in the
browser...
for example:
scriptdocumeny.theform.progressPercent.value++/script

Elias
Tom Kohnen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi!
 Well i suppose flush() is useful in your case, flush out the output
whenever
 it is called, and not when the page is fully generated (the usual case)!
 Sou you might to sth like this:

 - Print 1/4 of the progress bar
 - flush
 - wait some time
 - print 2/4 of the progress bar
 - flush
 

 i don't know if it works, but that's the way it'd do it ;)

 - Tom

 -Original Message-
 From: Serdar Sokmen [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 12, 2002 12:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] progress bar


 Hi,

 I would like to add a progress bar to an installtion program I'm writing
in
 PHP. I basically have one function that I call, it takes about 30 seconds
or
 so to finish executing... I haven't done such a thing before. Can anyone
 plese suggest me some ideas...

 Many Thanks

 Serdar



 --
 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