2 // Get the filetype and array of files
3 if ( ! isset($type) || ! isset($files) )
5 echo '$type and $files must be specified!';
11 // Loop through the files adding them to a string
12 foreach ( $files as $file ) {
13 $contents .= file_get_contents($file). "\n\n";
16 // Set the content type, filesize and an expiration so its not cached
17 header('Content-Type: ' . $type);
18 header('Content-Length: ' . strlen($contents));
19 header('Expires: Fri, 01 Jan 2010 05:00:00 GMT');