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

Recommend this page to a friend!

Picture of Pierre-Henry Soria
Name: Pierre-Henry Soria <contact>
Classes: 19 packages by
Country: United Kingdom
Age: 29
All time rank: 49126 in United Kingdom
Week rank: 38 1 in United Kingdom
Innovation award
Innovation award
Nominee: 3x

  Detailed description   Download .zip .tar.gz   Install with Composer  
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.


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.


Pierre-Henry Soria


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


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

  Classes of Pierre-Henry Soria  >  PHP 5.4 Session Upload Progress Bar  >  Download .zip .tar.gz  >  Support forum (3)  >  Blog  >  Latest changes  
Name: PHP 5.4 Session Upload Progress Bar
Base name: php-session-upload
Description: Track the progress of file uploads using sessions
Version: 1.3
PHP version: 5.4
License: Freeware
All time users: 1287 users
All time rank: 2962
Week users: 0 users
Week rank: 238
  Groups   Screenshots   User ratings   Applications   Files  

HTTP HTTP protocol clients, headers and cookies View top rated classes
PHP 5 Classes using PHP 5 specific features View top rated classes
Files and Folders Listing, accessing and manipulating files and folders View top rated classes

File Role Description
form-progress-bar Screen Form progress bar
upload-form Screen Upload form


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

  User ratings  
Not enough user ratings

  Applications that use this package  
No pages of applications that use this class were specified.

If you know an application of this package, send a message to the author to add a link here.

File Role Description
static (2 directories)
_screenshots (2 files)
download_progress.ajax.php Example Example script
index.php Example Example script
LICENSE.txt Lic. License text Doc. Documentation
Upload.class.php Class Class source
upload.php Example Example script

  Files  /  static  
File Role Description
css (1 file)
js (1 file)

  Files  /  static  /  css  
File Role Description
   common.css Data Auxiliary data

  Files  /  static  /  js  
File Role Description
   ProgressBar.class.js Class Auxiliary data

  Files  /  _screenshots  
File Role Description
   form_progress_bar.png Data Auxiliary data
   upload-form.png Data Auxiliary data

Install with Composer - Download all files: php-session-upload.tar.gz
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

For more information send a message to info at phpclasses dot org.