title: Adding text to image (animated gif) with PHP
body: <p>I want to allow my website visitors to personalize their banners with their names.</p>
  
  <p>1) The banners are animated GIFs, but the script only seems to output the first frame of the GIF image</p>
  
  <p>2) I need to add a text field to allow users to enter their desired text. After submitting the form, the image will be generated with their text</p>
  
  <p>Thank you!</p>
  
  <p>index.php (below)</p>
  
  <pre><code>&lt;img src="image.php?text=MyNameHere" alt="" /&gt;
  </code></pre>
  
  <p>image.php (below)</p>
  
  <pre><code>&lt;?php
  
  //Image
  $rImg = ImageCreateFromGIF("image.gif");
  
  //Definir cor
  $cor = imagecolorallocate($rImg, 0, 0, 0);
  
  //Text
  imagestring($rImg,5,126,22,urldecode($_GET['nome']),$cor);
  
  //Header output
  header('Content-type: image/gif');
  imagegif($rImg,NULL,100);
  
  ?&gt;
  </code></pre>