src/Ivliev/Imagefly/Imagefly.php
private function _output_file($file_data)
    {
        // Create the headers
        $this->_create_headers($file_data);
        
        // Get the file data
        $data = file_get_contents($file_data);
        
        // Send the image to the browser in bite-sized chunks
        $chunk_size = 1024 * 8;
        $fp = fopen('php://memory', 'r+b');
        
        // Process file data
        fwrite($fp, $data);
        rewind($fp);
        while (! feof($fp)) {
            echo fread($fp, $chunk_size);
            flush();
        }
        fclose($fp);
        
        exit();
    }
private function _output_file($file_data)
    {
        // Create the headers
        $this->_create_headers($file_data);
        
        // Get the file data
        $data = file_get_contents($file_data);
        
        // Send the image to the browser in bite-sized chunks
        $chunk_size = 1024 * 8;
        $fp = fopen('php://memory', 'r+b');
        
        // Process file data
        fwrite($fp, $data);
        rewind($fp);
        while (! feof($fp)) {
            echo fread($fp, $chunk_size);
            flush();
        }
        fclose($fp);
        
        exit();
    }
private function _output_file ( $ file_data ) { // Create the headers $ this -> _create_headers ( $ file_data ) ; // Get the file data $ data = file_get_contents ( $ file_data ) ; // Send the image to the browser in bite-sized chunks $ chunk_size = 1024 * 8 ; $ fp = fopen ( 'php://memory' , 'r+b' ) ; // Process file data fwrite ( $ fp , $ data ) ; rewind ( $ fp ) ; while ( ! feof ( $ fp ) ) { echo fread ( $ fp , $ chunk_size ) ; flush ( ) ; } fclose ( $ fp ) ; exit ( ) ; }
Outputs the cached image file and exits

@param
string path to the file to server (either default or cached version)
Outputs the cached image file and exits