Code
<?
include("include/config.php");
include("include/global.php");
@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
@header("Cache-Control: no-store, no-cache, must-revalidate");
@header("Cache-Control: post-check=0, pre-check=0",false);
@header("Pragma: no-cache");
srand();
$num=rand(1000,9999);
$rs=mysql_query("select ip from fishload_captchas where ip = '".$_SERVER['REMOTE_ADDR']."'");
$row=@mysql_fetch_row($rs);
if($row[0]=="")
mysql_query("insert into fishload_captchas set ip = '".$_SERVER['REMOTE_ADDR']."', datum = '".time()."', ua = '".$_SERVER['HTTP_USER_AGENT']."', num = '$num'");
else
mysql_query("update fishload_captchas set datum = '".time()."', ua = '".$_SERVER['HTTP_USER_AGENT']."', num = '$num' where ip = '".$_SERVER['REMOTE_ADDR']."'");
@mysql_close();
$im=imagecreate(112,49);
$bg=imagecolorallocate($im,rand(170,255),rand(170,255),rand(170,255));
$font=imagecolorallocate($im,rand(0,130),rand(0,130),rand(0,130));
imagettftext($im,rand(11,17),rand(-20,20),rand(20,30),rand(27,23),$font,"include/elephant.ttf",$num);
header("Content-Type: image/gif");
imagegif($im);
imagedestroy($im);
?>
Alles anzeigen
Hallo danke!!!
also die Schrifart ist im richtigen ordner so wie in der datei beschrieben