<?
/*
실험주소
http://www.owllab.com/ios/user_addhint.php
*/

include_once ("session.php");
include_once ("dbcon_light.php");

header("Cache-Control: no-cache, must-revalidate");
header("Content-type: image/png; charset=UTF-8");

$addhint = rand(1000,9999);
$suserdb[addhint] = $addhint;
setcookie ("suserdb.addhint", $suserdb[addhint], time() + $_cookieLifeTime, "/", strstr($_SERVER["HTTP_HOST"],"."));
	

$img = imagecreate(60, 26);
$bg = imagecolorallocatealpha($img, 255, 255, 255, 127);
$fontColor = imagecolorallocate($img, 0, 0, 0);
$font_size = 5;
$ypos = 5;
$len = strlen($addhint);
for($i=0;$i<$len;$i++){ 
	$xpos = $i * imagefontwidth($font_size) + ($i*4) + 5; 
	imagechar($img, $font_size, $xpos, $ypos, $addhint, $fontColor); 
	$addhint = substr($addhint, 1);   
}//for  
imagepng($img);
?>