[PHP] Upload Tracker.

2007-07-17 Thread Tom Ray [Lists]
I'm a little unsure on how to do this but basically when someone uses a 
form to upload a file I want to have a popup window come up and so the 
process in percentage of the transfer.  Anyone do this before? Is it 
possible in PHP or do I need to do it in javascript or a mixture of both?


Any suggestions, ideas, commands or functions to try to use? I would 
greatly appreciate it.


Thanks!

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



Re: [PHP] Upload Tracker.

2007-07-17 Thread Tanner Postert

i use a program called upload progress meter, it can be downloaded here:

http://pdoru.from.ro/upload-progress-meter/

I just wrote an ajax function to return the % of the download, and filled a
div on each upload. It depends on how often you poll for the %, but most
likely it won't be a smooth transition from 0-100% it will jump, 0, 12, 28,
38, 52, 71, 88, 92, 100, or something similar.

you will have to phpize the function and install it as a dynamic module, but
it works for me.

hope this helps.

On 7/17/07, Tom Ray [Lists] <[EMAIL PROTECTED]> wrote:


I'm a little unsure on how to do this but basically when someone uses a
form to upload a file I want to have a popup window come up and so the
process in percentage of the transfer.  Anyone do this before? Is it
possible in PHP or do I need to do it in javascript or a mixture of both?

Any suggestions, ideas, commands or functions to try to use? I would
greatly appreciate it.

Thanks!

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




Re: [PHP] Upload Tracker.

2007-07-17 Thread Paul Novitski

At 7/17/2007 11:46 AM, Tom Ray [Lists] wrote:
I'm a little unsure on how to do this but basically when someone 
uses a form to upload a file I want to have a popup window come up 
and so the process in percentage of the transfer.  Anyone do this 
before? Is it possible in PHP or do I need to do it in javascript or 
a mixture of both?



Upload progress can't be reported using PHP alone, but here's a 
PHP-perl amalgam you can check out:


Mega Upload
http://www.raditha.com/php/progress.php

I haven't used it can can't vouch for it.  When I tried their demo it 
failed but I think for reasons other than the functionality of the 
widget itself.


Paul 


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



Re: [PHP] Upload Tracker.

2007-07-17 Thread Richard Lynch
On Tue, July 17, 2007 1:46 pm, Tom Ray [Lists] wrote:
> I'm a little unsure on how to do this but basically when someone uses
> a
> form to upload a file I want to have a popup window come up and so the
> process in percentage of the transfer.  Anyone do this before? Is it
> possible in PHP or do I need to do it in javascript or a mixture of
> both?
>
> Any suggestions, ideas, commands or functions to try to use? I would
> greatly appreciate it.

For this to be a PHP question, you need PHP 5.2 (?) and the new file
upload hook that it supplies.

Otherwise, it's a Javascript/Ajax feature, with PHP being relegated to
not doing much of anything about the progress meter.

Why the BROWSER doesn't provide this feature everybody wants is beyond
my ken...

Surely the browser has some clue how many bytes are uploaded and how
big the file was.

How tricky could it be for Firefox/IE to poke those values into a
couple variables somewhere?

Instead we have a zillion JS hacks by developers generating tons of
traffic back-n-forth to the server to ask it how many bytes it has
received so far...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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