Размер файла: 720B
- <?php
- include "header/config.inc.php";
- include "header/function.inc.php";
- include "header/connect.inc.php";
- include "header/click-club.class.php";
-
- @mysql_query("DELETE FROM `".prefix."captcha` WHERE (`ip`='".ip."' && `ua`='".short_agent."') OR `ts`<".(time()-captchado));
- $ctext=$click_club->captcha_text(lenght_code);
- $result=@mysql_query("INSERT into `".prefix."captcha`
- (`ip`,`ua`,`ts`,`code`)
- values
- ('".ip."','".short_agent."','".time()."','".$ctext."')
- ");
- If (!$result) exit;
-
- $image=imageCreateFromPng("captcha.png");
- $colour=imageColorAllocate($image,0,0,0);
- imageTTFText($image,20,0,2,25,$colour,getcwd()."/click-club.ttf",$ctext);
- header("Content-type: image/png");
- imagepng($image);
- ?>