PHP Classes

100% PHP Uploader: Track the progress of file upload with Web sockets

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 48%Total: 3,183 All time: 1,122 This week: 61Up
Version Licenses PHP version Categories
up-man 0.1GNU Free Document...5.2HTTP
Description 

Author

This class can track the progress of file upload using Web sockets receive the files.

It can generate HTML and JavaScript to upload a file by using a TCP socket that listens to the HTTP request on a given port to receive the files being uploaded.

The class can send HTML with JavaScript statements to the browser that will update the upload progress information displayed to the user.

Innovation Award
PHP Programming Innovation award winner
November 2011
Winner


Prize: One book of choice by Packt
Uploading files to Web sites is a task that may take long if files are large.

Showing the progress of uploading large files to users is an important feature because it lets the user know how long he needs to wait and so reduce his anxiety.

This class can be used to show the progress of files being uploaded to a site. It starts a parallel Web server that receives a file being uploaded.

This way it can keep track of how much data has been received in order to show progress report in a parallel request using HTML and JavaScript to update the progress information on a Web page.

Manuel Lemos
Picture of Richard Keizer
  Performance   Level  
Name: Richard Keizer <contact>
Classes: 7 packages by
Country: The Netherlands The Netherlands
Age: 49
All time rank: 48213 in The Netherlands The Netherlands
Week rank: 216 Up2 in The Netherlands The Netherlands Up
Innovation award
Innovation award
Nominee: 5x

Winner: 1x

Details

Pure PHP uploader with progress bar! BEWARE: this is not for the faint hearted! if you don't know anything about HTTP requests and/or configuring your php-instance then pls stop reading and get back to school. This class is just a concept, it's usable, but certainly not production ready! This is an implementation of a 100% PHP upload manager. I've often broken my head to find a neat solution for this subject, and finally wrote one that's not too hard too manage and understand. The main goal was that it would be small. I started work on the socket abstraction part when I found out that in the upcoming PHP 5.4 release there will be upload progress functionality included. (late but ok). The latter is the reason I quit development of this little gem. If anybody feels like having a version with abstracted sockets then pls contact me. how to use this: 1. Put everything in a folder on your web server 2. Make sure the folder is writable and accessible with a browser. 3. Point your browser to this folder You should be up and running! pls. note that files are uploaded to the current folder! I've tested this with: - PHP 5.2.14 and Apache/2.2.14 (Unix) - PHP 5.3.6 and Apache/2.2.20 (Unix) - Firefox and Safari both on Mac OSX - Firefox and IE7 both on Windows XP considerations: Now when I think about this I would like to make a new implementation more proxy-a-like: http-proxy with status monitoring, this way we can project status for any kind of http request, not just multipart form uploads.

  Files folder image Files (7)  
File Role Description
Accessible without login Image file barbackground.jpg Data background for progressbar
Plain text file buffer.class.php Class storage for binary data
Plain text file httprequestparser.class.php Class very small multipart message parser
Accessible without login Plain text file index.php Example server example
Accessible without login Plain text file readme.txt Doc. read this first!
Accessible without login Image file throbber.gif Icon animated throbber
Plain text file uploadmanager.class.php Class the main class

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  
 0%
Total:3,183
This week:0
All time:1,122
This week:61Up
User Ratings User Comments (1)
 All time
Utility:59%StarStarStar
Consistency:65%StarStarStarStar
Documentation:56%StarStarStar
Examples:65%StarStarStarStar
Tests:-
Videos:-
Overall:48%StarStarStar
Rank:2965
 
Don t work for me.
12 years ago (Fernando)
40%StarStarStar