PHP3 Manual | ||
---|---|---|
Prev | Chapter 2. PHP3 features | Next |
PHP is not limited to creating just HTML output. It can also be used to create GIF image files, or even more convenient GIF image streams. You will need to compile PHP with the GD library of image functions for this to work.
Example 2-2. GIF creation with PHP <?php Header("Content-type: image/gif"); $string=implode($argv," "); $im = imagecreatefromgif("images/button1.gif"); $orange = ImageColorAllocate($im, 220, 210, 60); px = (imagesx($im)-7.5*strlen($string))/2; ImageString($im,3,$px,9,$string,$orange); ImageGif($im); ImageDestroy($im); ?> |
Prev | Home | Next |
PHP3 features | Up | File upload support |