Aggiunta info proxy

This commit is contained in:
cmaffio
2016-03-16 12:04:22 +01:00
parent a5ed0d219d
commit 990b05d3f2
6 changed files with 825 additions and 40 deletions

23
proxy/barra.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
if (isset ($_GET['max'])) $max = $_GET['max'];
if (isset ($_GET['val'])) $val = $_GET['val'];
if (isset ($_GET['col'])) $col = $_GET['col'];
$width = 400;
$height = 10;
$lun = $val / $max * $width;
$im = imagecreatetruecolor($width, $height);
$white = imagecolorallocate($im, 255, 255, 255);
imagecolortransparent($im, $white);
$color['red'] = imagecolorallocate($im, 255, 0, 0);
$color['blue'] = imagecolorallocate($im, 0, 0, 255);
imagefilledrectangle($im, 0, 0, $width, $height, $white);
imagefilledrectangle($im, 0, 0, $lun, $height, $color[$col]);
header("Content-type: image/png");
imagepng($im);
imagedestroy($im);
?>