Просмотр файла gif.php

Размер файла: 599B
  1. <?
  2. include "setup.php";
  3. $rand1 = rand(0000,9999);
  4. mysql_query ("UPDATE gb_protect SET code='$rand1' WHERE id='1'");
  5.  
  6.  
  7. $c = mysql_query ("SELECT * FROM gb_protect WHERE id='1'");
  8. $cc = mysql_fetch_array($c);
  9. $rand = $cc['code'];
  10.  
  11. if (!$image = @imagecreatefromgif('gif.gif'))
  12. {
  13. $image = imagecreate(88, 88);
  14. $backgroundcolor = imagecolorallocate($image, 0, 0, 0);
  15. imagefill($image, 0, 0, $backgroundcolor);
  16. }
  17. $fontcolor = imagecolorallocate($image, 0, 0, 0);
  18. $ses = $rand;
  19. imagestring($image, 5, 10, 5, $rand, $fontcolor);
  20. header("Content-type: image/gif");
  21. imagegif($image);
  22. ?>