PHP Classes
elePHPant
Icontem

Script Progress: Flush page output to show progress of server task

Recommend this page to a friend!
  Info   View files View files (18)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2012-03-17 (4 years ago) RSS 2.0 feedNot enough user ratingsTotal: 845 All time: 3,932 This week: 886Up
Version License PHP version Categories
script-progress 0.1MIT/X Consortium ...5.0HTML, PHP 5, Utilities and Tools
Description Author

This class can flush the output of the current page to show the progress of task running on the server.

It can output HTML and JavaScript with additional invisible page tags that will force some browsers to update the current page to show the progress of a task running on the server.

The outputted page is formatted in such way that it works with several major browsers like Firefox, Chrome, Internet Explorer and Opera.

Innovation Award
PHP Programming Innovation award nominee
March 2012
Number 3


Prize: One copy of DWebPro Standard License
One way to show in the browser the progress of a task going on the server side, is to keep outputting JavaScript code sections that update progress bars or other forms of giving progress feedback information to the user.

However, this approach does not work equally well in all browsers.

This class provides a solution that works around different browser quirks when trying to show on the browser the progress of a task running on the server.

Manuel Lemos
Picture of Tom Schaefer
  Performance   Level  
Name: Tom Schaefer is available for providing paid consulting. Contact Tom Schaefer .
Classes: 39 packages by
Country: Germany Germany
Age: ???
All time rank: 1099 in Germany Germany
Week rank: 50 Up2 in Germany Germany Up
Innovation award
Innovation award
Nominee: 9x

Winner: 1x

Details
Situation
Ich möchte eine Fortschrittsanzeige in PHP schreiben, die ohne Ajax auskommt.

Problem:
Viele Browser reagieren unerwartet. Manche ignorieren die sofortige Ausgabe. 

Lösung:
Ich kapsele die Operation des Ausgabepuffers in der Klasse ScriptProgress. Je nach Browser erzeugt die Klasse spezifischen Quelltext. 


situation
I want to write a progress bar in PHP that does not require Ajax.

problem:
Many browsers react unexpectedly. Some ignore the immediate issue.

solution:
I encapsulate the operation of the output buffer in the class script Progress. Depending on the browser the class generates specific output code.
  Files folder image Files  
File Role Description
Files folder imagev03 (4 files)
Accessible without login Plain text file .htaccess Conf. htaccess
Plain text file class.0.2.php Class second version
Plain text file class.php Class script progress class
Accessible without login Plain text file readme.txt Doc. ein paar worte
Accessible without login Plain text file sample.php Example a very simple sample
Accessible without login Plain text file sample2.php Example modify progress indicator..
Accessible without login Plain text file sample3.php Example step by step
Accessible without login Plain text file sample4.php Example styled progress bar
Accessible without login Plain text file sample5.php Example with image
Accessible without login Plain text file sample6.php Example working with stylesheet
Accessible without login Plain text file sample7.php Example ul bar with css3
Accessible without login Plain text file sample8.php Example additional browser notifications
Accessible without login Plain text file scriptprogress.js Aux. a very simple notification script
Accessible without login Plain text file style.css Data a simple css stylesheet

  Files folder image Files  /  v03  
File Role Description
  Plain text file class.0.3.php Class script progress class
  Accessible without login Plain text file sample.php Example Sample using notification and definition list
  Accessible without login Plain text file scriptprogress.js Aux. javascript helper
  Accessible without login Plain text file style.css Data CSS3 stylesheet

 Version Control Unique User Downloads Download Rankings  
 0%
Total:845
This week:0
All time:3,932
This week:886Up