set('Filter.ExtractStyleBlocks', true); $config->set('CSS.Proprietary', true); $config->set('CSS.AllowImportant', true); $config->set('CSS.AllowTricky', true); $level = error_reporting(E_ALL & ~E_STRICT); // $purifier = new HTMLPurifier($config); // $html = $purifier->purify(''); // error_reporting($level); // list($outputcss) = $purifier->context->get('StyleBlocks'); $context = new HTMLPurifier_Context(); $filter = new HTMLPurifier_Filter_ExtractStyleBlocks(); $outputcss = $filter->cleanCSS($curlret, $config, $context); file_put_contents($cssfile, $outputcss); if (!$invalidate) echo $outputcss; } else { // Either no modifications (status: 304) or an error condition. if ($invalidate) die('Error: custom CSS file not found'); if ($lastmodified) readfile($cssfile); } touch($cssfile, $timenow); // Don't check again for an hour. } else if (file_exists($cssfile)) { if ($invalidate) die('Error: custom CSS file not found'); readfile($cssfile); } curl_close($curl); if ($invalidate) { ?>

Done: was reloaded.

Back to server management