2006-11-27 00:52:11 +00:00
|
|
|
<?
|
|
|
|
$img = "/www/stamp/images/CAverify.png";
|
|
|
|
$arr = explode("//", mysql_real_escape_string(trim($_REQUEST['refer'])), 2);
|
|
|
|
$arr = explode("/", $arr['1'], 2);
|
|
|
|
$ref = $arr['0'];
|
|
|
|
|
2006-11-27 23:10:08 +00:00
|
|
|
$arr = explode("//", mysql_real_escape_string(trim($_SERVER['HTTP_REFERER'])), 2);
|
|
|
|
$arr = explode("/", $arr['1'], 2);
|
|
|
|
$siteref = $arr['0'];
|
|
|
|
|
2006-12-09 00:23:15 +00:00
|
|
|
if($_REQUEST['debug'] != 1)
|
|
|
|
header('Content-type: image/png');
|
2006-11-27 00:52:11 +00:00
|
|
|
$im = imagecreatefrompng($img);
|
|
|
|
|
2006-11-27 23:10:08 +00:00
|
|
|
if($ref == "" || ($ref != $siteref && $siteref != ""))
|
|
|
|
{
|
|
|
|
$tc = imagecolorallocate ($im, 255, 0, 0);
|
|
|
|
imagestring ($im, 2, 1, 30, "INVALID DOMAIN", $tc);
|
|
|
|
imagestring ($im, 2, 1, 45, "Click to Report", $tc);
|
|
|
|
imagepng($im);
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2006-11-29 11:08:20 +00:00
|
|
|
list($invalid, $info) = checkhostname($ref);
|
|
|
|
|
|
|
|
if($invalid > 0)
|
2006-11-27 00:52:11 +00:00
|
|
|
{
|
2006-11-29 11:08:20 +00:00
|
|
|
$tc = imagecolorallocate ($im, 255, 0, 0);
|
|
|
|
imagestring ($im, 2, 1, 30, "INVALID DOMAIN", $tc);
|
|
|
|
imagestring ($im, 2, 1, 45, "Click to Report", $tc);
|
|
|
|
imagepng($im);
|
|
|
|
exit;
|
2006-11-27 00:52:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$tz = intval($_REQUEST['tz']);
|
|
|
|
$now = date("Y-m-d", gmmktime("U") + ($tz * 3600));
|
|
|
|
|
|
|
|
$tc = imagecolorallocate ($im, 0, 0, 0);
|
|
|
|
imagestring ($im, 4, 1, 27, "Valid Cert!", $tc);
|
|
|
|
imagestring ($im, 1, 7, 42, "Click to Verify", $tc);
|
|
|
|
imagestring ($im, 1, 20, 52, $now, $tc);
|
|
|
|
imagepng($im);
|
|
|
|
?>
|