<?php
error_reporting(E_ALL ^ E_DEPRECATED);
include "include/functions.php";
include "include/errors.php";
include "include/getip.php";
$PHP_SELF=$_SERVER['PHP_SELF'];
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
if (ob_get_length()) ob_end_clean();
ob_start("ob_gzhandler");
}
else ob_start();
$allow=true;
include "include/ipfilter.php";
include "include/bans.php";
if ($allow) {
mt_srand((double)microtime()*1000000);
include "include/iplog.php";
include "include/browser.php";
$br = new Browser;
$text="";
if(isset($_GET['agent'])) $br->setUserAgent($_GET['agent']);
$text="Your IP: $ip".($host?(" (".$host.")"):"").(!empty($proxy)?("\nProxy: ".$proxy):"");
$text.="\nYour Browser: ".$br->getBrowser()." ".$br->getVersion()." OS: ".$br->GetPlatform();
$font="fonts/georgia.ttf";
$size=11; $angle = 0;
$_bx = imageTTFBbox($size,$angle,$font,$text);
$W = abs($_bx[2]-$_bx[0])+5;
$H = abs($_bx[5]-$_bx[3])+5;
$image = imagecreatetruecolor($W, $H);
$c_min=0;
$c_max=164;
$b_min=240;
$b_max=255;
$back = imagecolorallocate ($image,
mt_rand($b_min,$b_max),
mt_rand($b_min,$b_max),
mt_rand($b_min,$b_max)
);
$color = imagecolorallocate ($image,
mt_rand($c_min,$c_max),
mt_rand($c_min,$c_max),
mt_rand($c_min,$c_max)
);
imagefill($image, 0, 0, $back);
imagerectangle($image, 0, 0, $W-1, $H-1, $color);
imagefilter($image, IMG_FILTER_SMOOTH, 6);
$lines=explode("\n",$text);
$x=2; $y=$size+3;
for($i=0; $i< count($lines); $i++) {
$newY=$y+($i * $size*1.72);
$color = imagecolorallocate ($image,
mt_rand($c_min,$c_max),
mt_rand($c_min,$c_max),
mt_rand($c_min,$c_max)
);
imagettftext($image, $size, $angle, $x, $newY, $color, $font, $lines[$i]);
}
header("Content-Type: image/jpeg");
$name=explode(".", basename($PHP_SELF));
header("Content-disposition:inline; filename=".$name[0].".jpg");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header('Pragma: no-cache');
header("Expires: -1");
imagejpeg($image);
imagedestroy($image);
} else echo "BANNED";
?>
You can also check other includes below:
functions.php
errors.php
getip.php
ipfilter.php
bans.php
iplog.php
browser.php