I have the following code so far as I build a custom CAPTCHA thing for my site (if it's not right let me struggle, it's how I learn, seriously) my issue though as far as I know so far is that the CAPTCHA text is too small and I want to make it bigger.
CODE
<?php session_start();
$imgWidth=110;
$imgHeight=50;
$image=imagecreate($imgWidth,$imgHeight);
$colorWhite=imagecolorallocate($image,255,255,255);
$colorRed=imagecolorallocate($image,255,0,0);
$colorBlack=imagecolorallocate($image,0,0,0);
for($i=0;$i<13;$i++){
imageline($image,$i*10,0,$i*10,50,$colorBlack);
imageline($image,0,$i*5,110,$i*5,$colorBlack);
}
for($i=0;$i<26;$i++){
$x1 = rand(0,109);
$x2 = rand(1,110);
$y1 = rand(0,49);
$y2 = rand(1,50);
imageline($image,$x1,$y1,$x2,$y2,$colorBlack);
}
$rnum = rand(0,9999);
$pattern = "abcdefghijklmnopqrstuvwxyz";
$pattern2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$key = '';
for($i=0;$i<4;$i++){
$key .= $pattern{rand(0,25)};
}
$key2 = '';
for($i=0;$i<4;$i++){
$key2 .= $pattern2{rand(0,25)};
}
$string = $rnum.$key.$key2;
imagestring($image,3,1,15,$string,$colorRed);
header("Content-type: image/png");
imagepng($image);
imagedestroy($image);?>
If anyone has questions as to how any part works/what any part does feel free to ask and learn.