Create a Smiley Face using PHP GD Library PHP



Create a Smiley Face using PHP GD Library




Create a Smiley Face using PHP GD Library PHP
Example..



<?php

header ('Content-type:image/png');

$c=imagecreate(500,500);

$bc=imagecolorallocate($c,204, 0, 153);
$fc=imagecolorallocate($c,255, 255, 26);
$lc=imagecolorallocate($c,200,20,30);

imagefilledellipse($c,250,250,400,400,$fc);
imagefilledellipse($c,150,150,50,50,$lc);
imagefilledellipse($c,350,150,50,50,$lc);

imageline($c,250,275,280,275,$lc);
imageline($c,250,200,280,275,$lc);

imagearc($c,250,300,250,180,0,180,$lc);

imagepng($c);

imagedestroy($c);
?>

Out Put





2 comments

It’s a classic great for me to go to this blog site, it offers helpful suggestions
best new web designs

This comment has been removed by the author.


EmoticonEmoticon