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

Размер файла: 1.35Kb
<?php
/**********************************************/
/* Автор скрипта: Александр Есин              */
/* E-Mail: [email protected] ([email protected]) */
/* ICQ: 6464729                               */
/* Site: http://ticlove.ru                    */
/**********************************************/
?>
<?php
		define ('SECURED', true);
		
		require ('_inc/sql.php');
		require ('_inc/config.php');
		require ('_inc/function.php');
		
		if (empty($_SESSION['code'])) die();
		
		$im = imageCreateFromPng("code/img.png");
		$color = imageColorAllocate($im, 190, 44, 0);
		imageTTFText($im, 21, 0, 5, 23, $color, "code/Adventure.ttf", $_SESSION['code']);
		
		//антикеширование
		header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
		header("Cache-Control: no-store, no-cache, must-revalidate");
		header("Cache-Control: post-check=0, pre-check=0", false);
		header("Pragma: no-cache");
		
		//создание рисунка в зависимости от доступного формата
		if (function_exists("imagepng")) {
		   header("Content-type: image/png");
		   imagepng($im);
		} elseif (function_exists("imagegif")) {
		   header("Content-type: image/gif");
		   imagegif($im);
		} elseif (function_exists("imagejpeg")) {
		   header("Content-type: image/jpeg");
		   imagejpeg($im);
		} else {
		   die("No image support in this PHP server!");
		}
		imagedestroy ($im);	
?>