[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/var/www/se3/html2pdf/examples/res/ -> exemple09.png.php (source)

   1  <?php
   2      $px = isset($_GET['px']) ? $_GET['px'] : 0; $px = preg_replace('/[^0-9]/isU', '', $px);
   3      $py = isset($_GET['py']) ? $_GET['py'] : 0; $py = preg_replace('/[^0-9]/isU', '', $py);
   4  
   5      if ($px<1) $px = 5;
   6      if ($py<1) $py = 5;
   7  
   8      if ($px>20) $px = 20;
   9      if ($py>20) $py = 20;
  10  
  11      $width  = 100;
  12      $height = 100;
  13      $im = imagecreatetruecolor($width, $height);
  14  
  15      for ($y=0; $y<$height; $y+= $py) {
  16          for ($x=0; $x<$width; $x+= $px) {
  17              $c = imagecolorallocate($im, 200-$x, 100+$y, 100+$x-$y);
  18              imagefilledrectangle($im, $x, $y, $x+$px, $y+$py, $c);
  19          }
  20      }
  21  
  22      header("Content-type: image/png");
  23      imagepng($im);
  24      imagedestroy($im);


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1