0) { imagefilledrectangle ($image_canvas , $_GET['x'], $_GET['y'], $_GET['width'], $_GET['height'], $_GET['fill'] ); } else { imagerectangle ($image_canvas , $_GET['x'], $_GET['y'], $_GET['width'], $_GET['height'], $_GET['col'] ); } if (strlen($_GET['outfile']) > 0) { if (str_replace(".jp", "", $_GET['outfile']) != $_GET['outfile'] || str_replace(".JP", "", $_GET['outfile']) != $_GET['outfile']) { imagejpeg($image_canvas, $_GET['outfile']) or die("error saving jpeg"); } else if (str_replace(".gif", "", $_GET['outfile']) != $_GET['outfile'] || str_replace(".GIF", "", $_GET['outfile']) != $_GET['outfile']) { imagegif($image_canvas, $_GET['outfile']) or die("error saving jpeg"); } else { imagepng($image_canvas, $_GET['outfile']) or die("error saving png"); } echo '

Image is called ' . $_GET['outfile'] . '

'; } else { header('Content-type: image/png'); imagepng($image_canvas) or die("error saving png"); } } else if ($_GET['shape'] == "ellipse") { $image_canvas = imagecreatetruecolor($_GET['width'] * 2 + $_GET['x'],$_GET['height'] * 2 + $_GET['y']); if (strlen($_GET['fill']) > 0) { imagefilledellipse ($image_canvas , $_GET['x'], $_GET['y'], $_GET['width'], $_GET['height'], $_GET['fill'] ); } else { imageellipse ($image_canvas , $_GET['x'], $_GET['y'], $_GET['width'], $_GET['height'], $_GET['col'] ); } if (strlen($_GET['outfile']) > 0) { if (str_replace(".jp", "", $_GET['outfile']) != $_GET['outfile'] || str_replace(".JP", "", $_GET['outfile']) != $_GET['outfile']) { imagejpeg($image_canvas, $_GET['outfile']) or die("error saving jpeg"); } else if (str_replace(".gif", "", $_GET['outfile']) != $_GET['outfile'] || str_replace(".GIF", "", $_GET['outfile']) != $_GET['outfile']) { imagegif($image_canvas, $_GET['outfile']) or die("error saving jpeg"); } else { imagepng($image_canvas, $_GET['outfile']) or die("error saving png"); } echo '

Image is called ' . $_GET['outfile'] . '

'; } else { header('Content-type: image/png'); imagepng($image_canvas) or die("error saving png"); } } else if (str_replace("?", "", $_SERVER['REQUEST_URI']) != $_SERVER['REQUEST_URI']) { echo ''; } else { echo ''; } // echo ''; } else if (strlen($_SERVER['QUERY_STRING']) > 1 && str_replace("?", "", $_SERVER['REQUEST_URI']) != $_SERVER['REQUEST_URI']) { echo ''; } else if (strlen($_SERVER['QUERY_STRING']) > 1) { echo ''; } else { echo ''; } ?>