Created
January 20, 2017 15:04
-
-
Save anonymous/3c7af08bed1700b4a807e2ba6eeb61cb to your computer and use it in GitHub Desktop.
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(); | |
$sifreli = crypt(rand(0, 9999)); | |
$dogrulamaKodu = strtoupper(substr($sifreli, 5, 6)); | |
$_SESSION["dogrulamaKodu"] = $dogrulamaKodu; | |
$en =70; | |
$boy = 25; | |
$image = ImageCreate($en, $boy); | |
$beyaz = ImageColorAllocate($image, 255, 255, 255); | |
$siyah = ImageColorAllocate($image, 0, 0, 0); | |
$cizgiRengi = ImageColorAllocate($image, rand(0, 255), rand(0, 255), rand(0, 255)); | |
$cember1 = imagecolorallocatealpha($image, 0, 220, 100, 75); | |
$cember2 = imagecolorallocatealpha($image, 20, 200, 200, 75); | |
$cember3 = imagecolorallocatealpha($image, 250, 100, 250, 0); | |
imagefilledellipse($image, 17, 12, 21, 23, $cember1); | |
imagefilledellipse($image, 34, 12, 21, 23, $cember2); | |
imagefilledellipse($image, 53, 12, 20, 23, $cember3); | |
ImageFill($image, 0, 0, $beyaz); | |
ImageString($image, 7, 9, 5, $_SESSION["dogrulamaKodu"], $siyah); | |
imageline($image, 33, 2, 70, 200, $cizgiRengi); | |
imageline($image, 0, 100, 25, 0, $cizgiRengi); | |
imageline($image, 70, 25, rand(35, 45), 0, $cizgiRengi); | |
imageline($image, 0, 8, 70, 23, $cizgiRengi); | |
("Content-Type: image/jpegs"); | |
ImageJpeg($image); | |
ImageDestroy($image); | |
exit(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment