PHP / Javascript ile dosya yükleme İzleme PECL uzantısı gerektirir:
uploadprogress
Lütfen kullanıcılara ilerlemesini görüntülemek için gereken kod iyi bir örnektir:
Uber Uploader
Yanılmıyorsam eğer PHP ile iletişim kurmak için JQuery kullanır.
You could also write it yourself, It's not that complex.
Adlı yükleme formunun first elemanı olarak gizli bir öğesini ekleyin UPLOAD_IDENTIFIER
.
Poll a PHP script that calls uploadprogress_get_info( UPLOAD_IDENTIFIER )
It return an array containing the following:
time_start - The time that the upload began (unix timestamp),
time_last - The time that the progress info was last updated,
speed_average - Average speed in bytes per second,
speed_last - Last measured speed in bytes per second,
bytes_uploaded - Number of bytes uploaded so far,
bytes_total - The value of the Content-Length header sent by the browser,
files_uploaded - Number of files uploaded so far,
est_sec - Estimated number of seconds remaining.
Let PHP return the info to Javascript and you should have plenty of information.
Depending on the audience, you will likely not use all the info available.