rendered paste body<?php$straal = $_GET['a'];$hoogte = $_GET['b'];$volume = round($_GET['c']);if ($straal != '0' | $straal != 0 | $straal != 0){ teken_tank($hoogte, $straal * 2, $volume);}else{exit();}function teken_tank($hoogte, $diameter, $volume){ $width = 600; $height = 250; $tekenhoogte = -round(($hoogte / $diameter) * 198) + 224; $image = imagecreate($width, $height); $grijs = imagecolorallocate($image, 187, 187, 187); $dgrijs = imagecolorallocate($image, 180, 180, 180); $lgrijs = imagecolorallocate($image, 188, 187, 187); $zwart = imagecolorallocate($image, 0, 0, 0); $blauw = imagecolorallocate($image, 80, 80, 220); $tekst = imagecolorallocate($image, 230, 230, 230); //tekeningen imagefill($image, 0, 0, $grijs); imageline($image, 0, $tekenhoogte, 600, $tekenhoogte, $lgrijs); imageellipse($image, 125, 125, 200, 200, $zwart); imagefill($image, 125, 224, $blauw); imageRectangle($image, 265, 25, 565, 225, $zwart); imagefill($image, 125, 224, $blauw); imagefill($image, 266, 224, $blauw); //maatlijnen imageline($image, 125, 25, 125, 225, $zwart); imagestringup($image, 5, 110, 145, "$diameter cm", $zwart); imagestring($image, 5, 275, 200, "$volume l", $tekst); header("Content-Type: image/jpeg"); imagejpeg($image); imagedestroy($image);}?>