Thread: PHP Compressor
View Single Post
Old 05-27-2008, 05:13 PM   #5 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Well that blows my little hack away... All I've done to date as far as compression was to add this to the top of my config file (included first on every page, of course);

PHP Code:
ob_start("compress");

function 
compress ($buffer) {
    return 
str_replace(array("\r\n""\r""\n""\t"'  ''    ''    '), ''$buffer);

Looks pretty caveman now...
-m
delayedinsanity is offline  
Reply With Quote