Binita's code to Hexagon
SLAVE CODE FOLLOWS
<?php
header("Content-type: image/png"); // Make sure the correct MIME type is set
// Your image creation code goes here
// Example: create a simple PNG image
$image = imagecreate(200, 200);
$bgColor = imagecolorallocate($image, 238, 238, 238); // background color
$color = imagecolorallocate($image, 0, 0, 255); // blue for hexagon
// Define hexagon coordinates
$hexagon = array(50, 50, 150, 50, 175, 100, 150, 150, 50, 150, 25, 100);
$pts = count($hexagon) / 2;
// Draw the hexagon and fill it
imagepolygon($image, $hexagon, $pts, $color);
imagefilledpolygon($image, $hexagon, $pts, $color);
// Output the image
imagepng($image);
// Clean up
imagedestroy($image);
?>