Advertisement
Guest User

Untitled

a guest
Jan 18th, 2013
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <?php
  2. require('../config.php');
  3.  
  4. $css = '';
  5. $files = explode(',', $_SERVER['QUERY_STRING']);
  6.  
  7. if(sizeof($files)) {
  8.     header('Content-type: text/css');
  9.    
  10.     foreach($files as $file) {
  11.         $css.= (is_file($file.'.css') ? file_get_contents($file.'.css') : '');
  12.     }
  13.     echo str_replace(
  14.         array(
  15.             ': ',
  16.             '; ',
  17.             '} ',
  18.             ' }',
  19.             '{ ',
  20.             ' {'
  21.         ), array(
  22.             ':',
  23.             ';',
  24.             '}',
  25.             '}',
  26.             '{',
  27.             '{'
  28.         ),
  29.         str_replace(
  30.             array(
  31.                 "\r\n",
  32.                 "\r",
  33.                 "\n",
  34.                 "\t",
  35.                 '  ',
  36.                 '    ',
  37.                 '    '),
  38.             "",
  39.             preg_replace(
  40.                 '!/\*[^*]*\*+([^/][^*]*\*+)*/!',
  41.                 '',
  42.                 $css
  43.             )
  44.         )
  45.     );
  46. }
  47. else header('HTTP/1.0 404 Not Found');
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement