Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php session_start(); $width = 85; $height = 20; $font = "\155\157\x6e\x61\143\x..
Decoded Output download
<?php session_start();
$width = 85;
$height = 20;
$font = "monaco.ttf"; $im = imagecreate($width, $height); $bg = imagecolorallocate($im, 0, 0, 0); $len = 2;
$chars = 'ABDEFGHMNRT23456789abdefhnt';
$string = ''; for ($i = 0; $i < $len; $i++) { $pos = rand(0, strlen($chars)-1); $string .= $chars{$pos}; } $_SESSION['kode_captcha'] = $string;
$bgR = mt_rand(100, 200); $bgG = mt_rand(100, 200); $bgB = mt_rand(100, 200); $noise_color = imagecolorallocate($im, abs(255 - $bgR), abs(255 - $bgG), abs(255 - $bgB)); for($i = 0; $i < ($width*$height) / 3; $i++) { imagefilledellipse($im, mt_rand(0,$width), mt_rand(0,$height), 3, rand(2,5), $noise_color); }
$text_color = imagecolorallocate($im, 240, 240, 240); $rand_x = rand(0, $width - 50); $rand_y = rand(0, $height - 15);
imagestring($im, 18, $rand_x, $rand_y, $string, $text_color); header ("Content-type: image/png");
imagepng($im); ?>
Did this file decode correctly?
Original Code
<?php session_start();
$width = 85;
$height = 20;
$font = "\155\157\x6e\x61\143\x6f.\164\164\146"; $im = imagecreate($width, $height); $bg = imagecolorallocate($im, 0, 0, 0); $len = 2;
$chars = 'ABDEFGHMNRT23456789abdefhnt';
$string = ''; for ($i = 0; $i < $len; $i++) { $pos = rand(0, strlen($chars)-1); $string .= $chars{$pos}; } $_SESSION['kode_captcha'] = $string;
$bgR = mt_rand(100, 200); $bgG = mt_rand(100, 200); $bgB = mt_rand(100, 200); $noise_color = imagecolorallocate($im, abs(255 - $bgR), abs(255 - $bgG), abs(255 - $bgB)); for($i = 0; $i < ($width*$height) / 3; $i++) { imagefilledellipse($im, mt_rand(0,$width), mt_rand(0,$height), 3, rand(2,5), $noise_color); }
$text_color = imagecolorallocate($im, 240, 240, 240); $rand_x = rand(0, $width - 50); $rand_y = rand(0, $height - 15);
imagestring($im, 18, $rand_x, $rand_y, $string, $text_color); header ("\103o\x6et\x65\156\x74-\x74\x79\160e: \x69\155\x61\x67\x65/\160\x6e\147");
imagepng($im); ?>
Function Calls
imagecreate | 1 |
session_start | 1 |
Stats
MD5 | b2ed04ed744cfe2f4500f8f13f2bc355 |
Eval Count | 0 |
Decode Time | 60 ms |