Jump to content


Photo

Captcha font

php

  • Please log in to reply
No replies to this topic

#1 poep

poep

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 07 September 2013 - 12:19 AM

Hi,

 

First of all i hope someone can help me i do not know about php so if you can help me i apreciate it a lot

the below code is a captcha code i want to be able to set my own font how can i do this? and is it possible to turn this into a png image with transparancy background?

 

<?php
session_start();
//$text = rand(1000000,9999999); 
$text = rand(10000,99999);
$_SESSION["vercode"] = $text;

$height = 17;
$width = 60;
 
$image_p = imagecreate($width, $height);
$black = imagecolorallocate($image_p,243,247,250);
$white = imagecolorallocate($image_p, 0, 0, 0);
$font_size = 8;
 
imagestring($image_p, $font_size, 5, 0, $text, $white);
imagejpeg($image_p, null,100);

?>

 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com