[QUOTE=hero`in;1345706]   .
  image.php  :
[PHP]
function DrawCode($arr)
{
	header ("Content-type: image/jpeg");
	$lnw = 2; //px
	$lnh = 10; //px
	$w = count($arr) * $lnw;
	$h = $lnh;
	$im = imagecreate($w,$h) or die ("DrawShtrih error");
	$white = imagecolorallocate($im,255,255,255);
	$black = imagecolorallocate($im,0,0,0);
	for ($i = 0; $i < count($arr); $i++){
		$color = ($arr[$i]) ? $black : $white;
		imagefilledrectangle($im, $i*$lnw, 0, ($i+1)*$lnw, $lnh, $color);
	}
	ImageJPEG($im,"code.jpg");
	ImageDestroy($im);
}[/PHP]

   ,  :
[PHP]
<? //*
    include "image.php";
    $arr = array(1,1,0,1,1,1,1,0,1,0,1,0,0,1);
    DrawCode($arr);//*/
?>
<img src = "code.jpg">[/PHP]

  ,      -     .     code.jpg . .. ,  ,  .      -        text/html (  ),     ,  .[/QUOTE]
[PHP]
<?php //img.php 
session_start(); 
$rand=rand(11111,99999); 
$_SESSION['img']=$rand; 
$img = ImageCreateFromPng('pattern.png'); 
$color = ImageColorAllocate($img,0x66,0x66,0x66); 
$font = imageloadfont('font.gdf');
imagestring($img, $font, 15, 15, $rand, $color);
header('Content-Type: image/png'); 
Imagepng($img); 
?>
[/PHP]
[code]
<img src=img.php>
[/code]
pattern  font -  (   pattern(),     PHP4    font)