Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / www / html / ulungkusma_web_id / functions / | server ip : 104.21.89.46 your ip : 172.69.6.35 H O M E |
Filename | /var/www/html/ulungkusma_web_id/functions/gambar_anti_spam.php |
Size | 494 |
Permission | rw-rw-r-- |
Owner | ulung : ulung |
Create time | 27-Apr-2025 11:16 |
Last modified | 05-Feb-2025 12:52 |
Last accessed | 16-Jun-2025 11:12 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
session_start();
function strrand($length){
$str = "";
while(strlen($str)<$length){
$random=rand(48,122);
if( ($random>47 && $random<58) ){
$str.=chr($random); } }
return $str;
}
$text = $_SESSION['string']=strrand(6);
header("Content-type: image/png");
$im = imagecreatefrompng("latar.png");
$white = imagecolorallocate($im, 255, 255, 255);
$font = '04B_03B.ttf';
$fontsize=20;
imagettftext($im, $fontsize, 0, 20, 30, $white, $font, $text );
imagepng($im);
imagedestroy($im);
?>
session_start();
function strrand($length){
$str = "";
while(strlen($str)<$length){
$random=rand(48,122);
if( ($random>47 && $random<58) ){
$str.=chr($random); } }
return $str;
}
$text = $_SESSION['string']=strrand(6);
header("Content-type: image/png");
$im = imagecreatefrompng("latar.png");
$white = imagecolorallocate($im, 255, 255, 255);
$font = '04B_03B.ttf';
$fontsize=20;
imagettftext($im, $fontsize, 0, 20, 30, $white, $font, $text );
imagepng($im);
imagedestroy($im);
?>