<?php
	ob_start(); 
	session_start();
	header("Content-type: image/gif");
    $type = $_GET['type'];
    if($type==1) $str = $_SESSION['ph_img'];
    elseif ($type == 2) $str = $_SESSION['mo_img'];

    $im = @imagecreate(180, 16);  
    imagecolorallocate($im,236,245,255);  
    $loc = 2;  
    for($i=0;$i<strlen($str);$i++){  
        $rands[$i] = $str{$i}; 
        $color=imagecolorallocate($im, 0, 0, 0);  
        imagestring($im, 3, $loc, 0, $rands[$i], $color);  
        $loc += 10;  
    }  

    Imagegif($im);  
    imagedestroy($im);  
    ob_end_flush(); 
?> 
