PHP Classes

PHP 5.4 Session Upload Progress Bar: Track the progress of file uploads using sessions

Recommend this page to a friend!
  Info   Documentation   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (9 months ago) RSS 2.0 feedStarStarStarStar 66%Total: 1,335 This week: 1All time: 2,899 This week: 45Up
Version License PHP version Categories
php-session-upload 1.12Freeware5.4HTTP, PHP 5, Files and Folders
Description 

Author

This class can track the progress of file uploads using sessions.

It can check a session variable assigned to keep track of the progress of a file upload.

The class can return the current upload progress value in percentage.

The class can set the session variable to cancel a file upload in progress.

It can also move the file to a given directory after the upload has finished.

Picture of Pierre-Henry Soria
  Performance   Level  
Name: Pierre-Henry Soria <contact>
Classes: 49 packages by
Country: United Kingdom
Innovation award
Innovation award
Nominee: 18x

Winner: 3x

Recommendations

Large file upload handler
Looking for class that will handle large file uploads

Documentation

PHP 5.4 - File Upload Progress Bar

This is an example how to create a progress bar using PHP 5.4 to calculate the progress of a file being downloaded.

I also used the jQuery framework to query AJAX to know the percentage of the progress in real time.

Finally, if you want more info concerning this PHP feature, you can visit the official PHP website or check my French ebook here.

Example of the progress bar

Server Requirements

PHP 5.4.0 or higher.

Author

Pierre-Henry Soria

Contact

By email at: pierrehenrysoria {{AT}} gmail {{D0T}} com or at: ph7software {{AT}} gmail {{D0T}} com

License

This source code is under the license Creative Commons Attribution 3.0 or later; See the LICENSE.txt file.


Screenshots (2)  
  • form-progress-bar
  • upload-form
  Files folder image Files (12)  
File Role Description
Files folder imagestatic (2 directories)
Files folder image_screenshots (2 files)
Accessible without login Plain text file download_progress.ajax.php Example Example script
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE.txt Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Plain text file Upload.class.php Class Class source
Accessible without login Plain text file upload.php Example Example script

  Files folder image Files (12)  /  static  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (1 file)

  Files folder image Files (12)  /  static  /  css  
File Role Description
  Accessible without login Plain text file common.css Data Auxiliary data

  Files folder image Files (12)  /  static  /  js  
File Role Description
  Plain text file ProgressBar.class.js Class Auxiliary data

  Files folder image Files (12)  /  _screenshots  
File Role Description
  Accessible without login Image file form_progress_bar.png Data Auxiliary data
  Accessible without login Image file upload-form.png Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 83%
Total:1,335
This week:1
All time:2,899
This week:45Up
User Ratings User Comments (1)
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:66%StarStarStarStar
Rank:508
 
Nice programming, comments etc.
11 years ago (Carl Friis-Hansen)
80%StarStarStarStarStar