PHP Classes

File Size Helper: Determine the file size even if is larger than 2GB

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 250 All time: 7,910 This week: 119Up
Version License PHP version Categories
file-size-helper 1.0GNU Lesser Genera...5PHP 5, Files and Folders
Description 

Author

This class can determine the file size even if is larger than 2GB.

It can use different methods to determine the size of a large file that works when it is larger than 2GB.

Currently it can use as file size detection the PHP filesize() function, the Curl extension, the PHP seek function, a COM extension on Windows or executing an external program on other systems.

Picture of Mohamed Elkholy
Name: Mohamed Elkholy is available for providing paid consulting. Contact Mohamed Elkholy .
Classes: 3 packages by
Country: Egypt Egypt
Age: 33
All time rank: 113510 in Egypt Egypt
Week rank: 312 Up3 in Egypt Egypt Up
Innovation award
Innovation award
Nominee: 1x

Details

FileSizeHelper ================== ## Class for manipulating large files (bigger than 2GB) This class detects the real file size of a specified file even if the file size is begger than 2GB, the class also able to format the resulted file size in KB, MB, GB, TB units which make it more readable. The class uses several methods to detect bigger file sizes: 1. The native filesize() function 2. Using the cURL module 3. Using the php native seek function 4. Windows COM interface (on windows server) 5. Using external program (exec() function needed) ## Usage <?php require ("filesizeHelper.php"); $filesizeHelper = new FilesizeHelper(); $file = 'c:\Just.A.Very.Large.File.avi'; $filesize = $filesizeHelper->getFileSize($file); var_dump($filesize); ?> ## Updates & Bugs To see more details about latest release & bugs, go to this URL: https://github.com/blasten/turn.js/issue ## Changelog v1.0 - initial release

  Files folder image Files  
File Role Description
Plain text file filesizeHelper.php Class FileSizeHelper class source
Accessible without login Plain text file readme.txt Doc. Documentation & Usage information
Accessible without login Plain text file demo.php Example Demo file
Accessible without login Plain text file license.txt Lic. License file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:250
This week:0
All time:7,910
This week:119Up