<?php
//Create a blank image
$image = imagecreatetruecolor(700, 200);
// Set the background color of image
$background_color = imagecolorallocate($image, 255, 255, 255);
// Fill background with above selected color
imagefill($image, 0, 0, $background_color);
// Prepare the colors
$red = imagecolorallocate($image, 255, 0, 0);
$green = imagecolorallocate($image, 0, 255, 0);
// Draw a dashed line, 7 red pixels, 3 white pixels
$style = array($red, $red, $red, $red, $red, $ren, $red, $green, $green, $green);
imagesetstyle($image, $style);
// Set the vertices of polygon
$values = array(
150, 150,
450, 150,
150, 50,
);
// Draw the polygon
imagepolygon($image, $values, 3, IMG_COLOR_STYLED);
// Output image to the browser
header('Content-type: image/png');
imagepng($image);
?>