Aggiunta info proxy
This commit is contained in:
23
proxy/barra.php
Normal file
23
proxy/barra.php
Normal 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);
|
||||
?>
|
||||
Reference in New Issue
Block a user