public function render img header Expires Mon 26 Jul 1997 05 00 00 GMT

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
public function render($img) {
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
if(function_exists("imagejpeg")) {
header("Content-Type: image/jpeg");
imagejpeg($img, null, $this->jpeg_quality);
} elseif (function_exists("imagegif")) {
header("Content-Type: image/gif");
imagegif($img);
} elseif(function_exists("imagepng")) {
header("Content-Type: image/x-png");
imagepng($img);
}
}