rendered paste bodytest.php:<?phpheader("Content-type: image/png");$p = new Graph(500,200);$p->addBorder("black");$p->renderImage();?>graph.php:<?phpclass Graph { public function Graph($x_size, $y_size) { $this->im = imagecreate($x_size, $y_size); $this->x_size = $x_size; $this->y_size = $y_size; } public function addBorder($color) { imageline($this->im, 0, 0, $this->x_size, 0, getColor($color)); imageline($this->im, $this->x_size, 0, $this->x_size, $this->y_size, getColor($color)); imageline($this->im, $this->x_size, $this->y_size, 0, $this->y_size, getColor($color)); imageline($this->im, 0, $this->y_size, 0, 0, getColor($color)); } public function renderImage() { imagepng($this->im); imagedestroy($this->im); }}?>