int imagepolygon(int im, array points, int num_points, int col);
ImagePolygon creates a polygon in image id. points is a PHP array containing the polygon's vertices, ie. points = x0, points = y0, points = x1, points = y1, etc. num_points is the total number of vertices.
See also imagecreate().