PHP Classes

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

Recommend this page to a friend!
  Info   View files Documentation   Screenshots Screenshots   View files View files (10)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (2 months ago) RSS 2.0 feedStarStarStarStar 66%Total: 1,332 This week: 1All time: 2,905 This week: 571Up
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: 46 packages by
Country: United Kingdom
Age: 33
All time rank: 37916 in United Kingdom
Week rank: 23 Up1 in United Kingdom Up
Innovation award
Innovation award
Nominee: 17x

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  
  • form-progress-bar
  • upload-form
  Files folder image Files  
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  /  static  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (1 file)

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

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

  Files folder image Files  /  _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

 Version Control Unique User Downloads Download Rankings  
 83%
Total:1,332
This week:1
All time:2,905
This week:571Up
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:514
 
Nice programming, comments etc.
10 years ago (Carl Friis-Hansen)
80%StarStarStarStarStar