Просмотр файла wap_gb/antispam.php

Размер файла: 663B
<?php
header("Cache-Control: no-cache, no-store, must-revalidate");
header("Pragma: no-cache");
header("Content-type: image/gif");


$rand=rand(10000,99999);
$a=explode('/',$HTTP_USER_AGENT);
$a=htmlspecialchars(stripslashes($a[0]));

$userdata=$REMOTE_ADDR.'-'.$a;



$md5rand=md5($rand);


$im = ImageCreatefromGIF('antispam.gif');
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 255, 255, 250);
imagettftext($im, 12, 0, 7, 18, $text_color, "ds_greece.ttf", $rand);


$fp=fopen('./antispam/'.$userdata.'.dat','w');
fputs($fp,$md5rand);
fclose($fp);

ImageGIF($im);
imagedestroy($im);

?>