English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi, i made this little script, im trying to make one of them images that shows a number which you have to type in, to stop bots from flooding your site. Can someone please edit this script so the valur of the variable "$jo" is shown in random fonts each time.


The script:



Header ("Content-type: image/png");

$img_handle = imageCreateFromPNG("Secure.png");

$color = ImageColorAllocate ($img_handle, 100, 100, 100);

$jo = "6767fjddms8";

ImageString ($img_handle, 3, 10, 9, "$jo", $color);

ImagePng ($img_handle);

ImageDestroy ($img_handle);

?>

2006-12-03 00:08:42 · 2 answers · asked by peter s 1 in Computers & Internet Programming & Design

2 answers

There are only five built-in fonts in GD, and they are not so different from one another... But if you want it, here you go: replace

ImageString ($img_handle, 3, 10, 9, $jo, $color);

with

ImageString ($img_handle, rand (1, 5), 10, 9, $jo, $color);

2006-12-04 10:28:00 · answer #1 · answered by NC 7 · 0 0

based on the context of the question, the respond is the two a "do-on the comparable time" loop or a "positioned up-demonstrated" loop. A positioned up-demonstrated loop is a loop that makes an technology and *then* evaluates the test expression. A do-on the comparable time loop is probable the main conventional style of positioned up-demonstrated loop.

2016-12-13 19:06:02 · answer #2 · answered by glassburn 4 · 0 0

fedest.com, questions and answers