first commit
This commit is contained in:
21
images/R_TOPISTO_image.php
Normal file
21
images/R_TOPISTO_image.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
$type='spline';
|
||||
if (isset($_REQUEST['type'])) $type=$_REQUEST['type'];
|
||||
|
||||
$files = glob('/opt/TOPISTO/data/'.$type.'/*.png');
|
||||
usort($files, function($a, $b) {
|
||||
return filemtime($a) > filemtime($b);
|
||||
});
|
||||
|
||||
$block_image = @imagecreatefrompng($files[0]);
|
||||
|
||||
// ---
|
||||
// --- envoyer l'image au navigateur
|
||||
// ---
|
||||
header("Content-Type: image/png");
|
||||
imagepng($block_image);
|
||||
|
||||
imagedestroy($block_image);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user