array(), 'js_exclusions' => array('.php?'), 'cache_expiration_time' => '14 days', 'cache_dir_public' => sys_get_temp_dir(), 'cache_dir_private' => sys_get_temp_dir(), 'cache_dir_url_public' => 'http://example.com/htmlc/cache/public', 'current_url_scheme' => 'http', 'current_url_host' => parse_url($url, PHP_URL_HOST), 'current_url_uri' => parse_url($url, PHP_URL_PATH), 'compress_combine_head_body_css' => TRUE, 'compress_combine_head_js' => TRUE, 'compress_combine_footer_js' => TRUE, 'compress_inline_js_code' => TRUE, 'compress_css_code' => TRUE, 'compress_js_code' => TRUE, 'compress_html_code' => FALSE, 'benchmark' => FALSE, 'product_title' => 'HTML Compressor', 'vendor_css_prefixes' => array('moz', 'webkit', 'khtml', 'ms', 'o') ); $html_compressor = new \websharks\html_compressor\core($html_compressor_options); $compressed_html = $html_compressor->compress(file_get_contents($url)); echo $compressed_html;