PHP Classes

PHP Minify HTML CSS JS: Compress Web files removing unnecessary text

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 239 This week: 1All time: 8,041 This week: 571Up
Version License PHP version Categories
php-minify-class 1.0.0MIT/X Consortium ...5HTML, PHP 5, Text processing, Compres...
Description 

Author

This class can compress Web files removing unnecessary text.

It can take as parameters names of files typically used in Web applications like HTML, CSS and JavaScript.

The class can compress the files by removing unnecessary text data like spaces, tabs, line breaks and comments. Then it returns a string with the text of the files after being compressed this way.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 22
All time rank: 84611 in Pakistan Pakistan
Week rank: 103 Up4 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x

Example

<?php

require_once 'classes/Minify.php';

$minify = new Minify();
$file = $minify->htmlMinify('test.html');
//$file = $minify->cssMinify("boostrap.css");
//$file = $minify->javascriptMinify("jsfile");
/* OR */
//$code = $minify->htmlMinify($code,"code");
//$code = $minify->cssMinify($code,"code")
//$code = $minify->javascriptMinify($code,"code")
/* These three functions support two arguments
First file or code,
second type default is file if you passed code so you should passed code in first argument
*/
var_dump($file);


Details

PHP Minify Class

Minify your code commpress the size, increased speed

Feature

- Minify HTML - Minify CSS - Minify JavaScript


  Files folder image Files  
File Role Description
Files folder imageclasses (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENCE Lic. License text
Accessible without login Plain text file readme.md Data Read me
Accessible without login Plain text file test.html Data Sample HTML file

  Files folder image Files  /  classes  
File Role Description
  Plain text file Minify.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:239
This week:1
All time:8,041
This week:571Up