PHP/Graphics Image/imagegif

Материал из Web эксперт
Версия от 10:05, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Working with GIFs

   <source lang="html4strict">

<?php

   $animage = imagecreate (200, 200);
   $red = imagecolorallocate ($animage, 255, 0, 0);
   imagerectangle ($animage, 0, 0, 200, 200, $red);
   $white = imagecolorallocate ($animage, 255, 255, 255);
   imagestring($animage, 5, 45, 50, "Hello World!", $white);
   imagegif ($animage);
   header ("Content-type: image/gif");
   imagedestroy ($animage);

?>

 </source>