| name | language | licence |
|---|---|---|
| Contact Form 1 | PHP | Other |
| Email Obfuscation | PHP | Other |
| MultiSort | PHP | Other |
| Show Recent Posts 2 | PHP | Other |
| JavaScript Compressor - PHP | PHP | GPL 2 |
| officeHours OPEN/CLOSE visitor notification | PHP | Other |
| Contact Form 2 | PHP | Other |
| Consolidate RapidWeaver style sheets | PHP | Other |
< 1 2 >
language: PHP
licence: GPL 2
JavaScript Compressor - PHP
options: view full snippet • send to code collector
<?php
// fetch JavaScript files to compress
$jsfiles = array_keys($_GET);
$js = ''; // code to compress
$jscomp = ''; // compressed JS
$err = ''; // error string
$reduced = -1; // compression saving
// fetch JavaScript files
for ($i = 0, $j = count($jsfiles); $i < $j; $i++) {
$fn = $jsfiles[$i] . '.js';
$jscode = @file_get_contents($fn);
if ($jscode !== false) {



library
css (23)