Created
August 4, 2014 19:09
-
-
Save 01-Scripts/26a9e311c5a60db5aaff to your computer and use it in GitHub Desktop.
Just use the following secimg.php instead of the original one to get a captcha only with numbers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
session_start(); | |
$secCode = rand(100000,999999); | |
$_SESSION['antispam_'.$_GET['formid']] = md5($secCode); | |
// get from: http://www.01-scripts.de/01scripts/01pics/sec.jpg | |
$im = imagecreatefromjpeg("sec.jpg"); | |
// get from: http://www.01-scripts.de/01scripts/01pics/verdanab.ttf | |
$font = "verdanab.ttf"; | |
$fontSize = 12; | |
$fontColor = imagecolorallocate($im, 70, 70, 70); | |
imagettftext($im, $fontSize, 10, 5, 25, $fontColor, $font, $secCode); | |
header("Content-Type: image/jpeg"); | |
imagejpeg($im,NULL,100); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Addon for https://gist.github.com/01-Scripts/535068