photo onepiecelogonormal.gif
Unknown On Selasa, 15 September 2015

<?php
//captcha basic
session_start();

//membuat kata acak
$alphaNumeric = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$random = substr(str_shuffle($alphaNumeric), 0, 1);
$random1 = substr(str_shuffle($alphaNumeric), 0, 1);
$random2 = substr(str_shuffle($alphaNumeric), 0, 1);
$random3 = substr(str_shuffle($alphaNumeric), 0, 1);
$random4 = substr(str_shuffle($alphaNumeric), 0, 1);
$random5 = substr(str_shuffle($alphaNumeric), 0, 1);


//membuat gambar dg background biru
$image = imagecreate(100, 50);//100,40
$backcolor = imagecolorallocate($image, 80, 45, 56);
$textColor = imagecolorallocate($image, 0, 240, 200);
$textColor1 = imagecolorallocate($image, 275, 35, 0);
$textColor2 = imagecolorallocate($image, 25, 210, 25);
$textColor3 = imagecolorallocate($image, 150, 150, 200);
$textColor4 = imagecolorallocate($image, 0, 130, 120);
$textColor5 = imagecolorallocate($image, 150, 200, 50);


imagestring ($image, 10, 20, 13, $random, $textColor);
imagestring ($image, 10, 30, 13, $random1, $textColor1);
imagestring ($image, 10, 40, 13, $random2, $textColor2);
imagestring ($image, 10, 50, 13, $random3, $textColor3);
imagestring ($image, 10, 60, 13, $random4, $textColor4);
imagestring ($image, 10, 70, 13, $random5, $textColor5);


//memberi nilai sesi
$_SESSION['image_random_value'] = md5($random);

header('Content-type: image/jpeg');
imagejpeg($image);
imagedestroy($image);
?


Leave a Reply

Subscribe to Posts | Subscribe to Comments

Links

Text-Ads

script type="text/javascript" src=" http://imemovaz.googlecode.com/files/tripleflap.js">
Diberdayakan oleh Blogger.

About Me

Followers

Popular Posts