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

Signing you up...

Thank you for signing up!

PHP Decode

public function activate(Request $request) { goto pR_Ou; HPBAl: $this_http_o..

Decoded Output download

<?  public function activate(Request $request) 
    { 
        goto pR_Ou; HPBAl: $this_http_or_https = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" or isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) and $_SERVER["HTTP_X_FORWARDED_PROTO"] === "https") ? "https://" : "http://";  
		goto BgHBV; g3uWy: $this_ip = getenv("SERVER_ADDR") ?: $_SERVER["SERVER_ADDR"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname());  
		goto bQUuM; Gedx8: $context = stream_context_create(array("ssl" => array("verify_peer" => false, "verify_peer_name" => false)));  
		goto SpJhC; pR_Ou: $this_server_name = getenv("SERVER_NAME") ?: $_SERVER["SERVER_NAME"] ?: getenv("HTTP_HOST") ?: $_SERVER["HTTP_HOST"];  
		goto HPBAl; bQUuM: $varUrl = "https://newcodex.propernaam.co.in/api/activate_license?key=543D768822DAEED8EA39&url={$this_url}&ip={$this_ip}&product_id=8176E803&license_code={$request->license}&client_name={$request->domain}&verify_type=non_envato";  
		goto Gedx8; rEMFw: $msg = $chk["message"];  
		goto t3IdJ; t3IdJ: if ($chk["status"]) {  
		$admin = Admin::find(1);  
		$admin->license = $request->license;  
		$admin->domain = $request->domain;  
		$admin->save();  
		return redirect(route("admin.dashboard"))->with("status-success", $msg);  
		} else {  
		return redirect(route("admin.license"))->with("status-alert", $msg);  
		}  
		goto N6Sho; SpJhC: if (ini_get("allow_url_fopen")) {  
		$contents = file_get_contents($varUrl, false, $context);  
		} else {  
		$ch = curl_init();  
		curl_setopt($ch, CURLOPT_URL, $varUrl);  
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
		$contents = curl_exec($ch);  
		if (curl_errno($ch)) {  
		echo $error_msg = curl_error($ch);  
		}  
		curl_close($ch);  
		} goto qDb3v; BgHBV: $this_url = $this_http_or_https . $this_server_name . $_SERVER["REQUEST_URI"];  
		goto g3uWy; qDb3v: $chk = json_decode($contents, true);  
		goto rEMFw; N6Sho:  
 
    } 
 ?>

Did this file decode correctly?

Original Code

public function activate(Request $request)
    {
        goto pR_Ou; HPBAl: $this_http_or_https = (isset($_SERVER["\110\124\124\120\x53"]) && $_SERVER["\110\x54\124\120\123"] == "\x6f\156" or isset($_SERVER["\x48\x54\x54\120\137\130\x5f\x46\117\122\127\101\x52\104\105\104\x5f\x50\x52\x4f\x54\117"]) and $_SERVER["\x48\124\x54\x50\137\130\137\106\x4f\122\x57\x41\x52\x44\105\x44\x5f\120\x52\117\124\117"] === "\x68\164\x74\x70\163") ? "\150\x74\164\x70\163\72\57\57" : "\150\164\x74\x70\x3a\57\57"; 
		goto BgHBV; g3uWy: $this_ip = getenv("\x53\x45\122\126\105\x52\x5f\x41\104\104\x52") ?: $_SERVER["\x53\105\122\x56\x45\122\x5f\101\104\104\x52"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname()); 
		goto bQUuM; Gedx8: $context = stream_context_create(array("\x73\163\x6c" => array("\166\x65\162\151\146\x79\x5f\x70\145\x65\x72" => false, "\x76\145\162\x69\146\171\x5f\x70\145\x65\x72\x5f\156\x61\155\145" => false))); 
		goto SpJhC; pR_Ou: $this_server_name = getenv("\x53\x45\122\x56\x45\122\x5f\116\x41\115\x45") ?: $_SERVER["\123\105\122\126\105\122\x5f\116\x41\x4d\x45"] ?: getenv("\110\124\x54\120\x5f\x48\x4f\123\x54") ?: $_SERVER["\x48\x54\x54\x50\x5f\x48\117\x53\x54"]; 
		goto HPBAl; bQUuM: $varUrl = "\150\x74\x74\x70\x73\72\57\x2f\156\145\x77\143\157\x64\145\x78\x2e\x70\162\x6f\x70\145\x72\156\141\141\x6d\56\143\157\x2e\x69\156\x2f\141\160\x69\57\141\x63\x74\151\166\141\164\x65\137\154\151\x63\145\156\163\145\77\x6b\145\x79\75\65\x34\x33\104\x37\x36\x38\x38\62\62\104\x41\105\105\x44\70\x45\x41\x33\x39\x26\x75\x72\154\75{$this_url}\x26\151\160\75{$this_ip}\46\160\162\x6f\x64\x75\x63\164\x5f\x69\x64\x3d\70\x31\67\66\105\x38\60\63\46\x6c\151\143\145\x6e\x73\145\x5f\x63\157\x64\x65\75{$request->license}\x26\143\x6c\151\145\156\164\x5f\x6e\x61\x6d\145\75{$request->domain}\46\x76\145\162\x69\x66\171\137\x74\171\x70\x65\75\x6e\157\x6e\137\145\156\166\141\164\x6f"; 
		goto Gedx8; rEMFw: $msg = $chk["\155\145\163\x73\x61\147\145"]; 
		goto t3IdJ; t3IdJ: if ($chk["\163\x74\x61\x74\165\163"]) { 
		$admin = Admin::find(1); 
		$admin->license = $request->license; 
		$admin->domain = $request->domain; 
		$admin->save(); 
		return redirect(route("\141\144\x6d\x69\156\x2e\x64\141\163\150\142\157\x61\162\144"))->with("\163\164\141\164\165\x73\x2d\x73\165\x63\x63\145\163\x73", $msg); 
		} else { 
		return redirect(route("\x61\144\155\x69\156\x2e\154\x69\143\x65\x6e\x73\145"))->with("\x73\164\x61\164\x75\x73\55\141\x6c\145\162\x74", $msg); 
		} 
		goto N6Sho; SpJhC: if (ini_get("\x61\x6c\154\x6f\x77\x5f\x75\162\x6c\137\x66\x6f\x70\x65\x6e")) { 
		$contents = file_get_contents($varUrl, false, $context); 
		} else { 
		$ch = curl_init(); 
		curl_setopt($ch, CURLOPT_URL, $varUrl); 
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
		$contents = curl_exec($ch); 
		if (curl_errno($ch)) { 
		echo $error_msg = curl_error($ch); 
		} 
		curl_close($ch); 
		} goto qDb3v; BgHBV: $this_url = $this_http_or_https . $this_server_name . $_SERVER["\122\105\121\125\105\x53\x54\137\x55\x52\x49"]; 
		goto g3uWy; qDb3v: $chk = json_decode($contents, true); 
		goto rEMFw; N6Sho: 

    }

Function Calls

None

Variables

None

Stats

MD5 c198f4b0b13a202a6845e270276e12fc
Eval Count 0
Decode Time 95 ms