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 include 'conn.php'; function httpPost($url, $data) { $curl = curl_init($url);..

Decoded Output download

<?php 
include 'conn.php'; 
function httpPost($url, $data) { 
    $curl = curl_init($url); 
    curl_setopt($curl, CURLOPT_POST, true); 
    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data)); 
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
    $response = curl_exec($curl); 
    curl_close($curl); 
    return $response; 
} 
 
date_default_timezone_set('Asia/Calcutta'); 
$time = date("Y-m-d H:i:s"); 
 
function random_strings($length_of_string) { 
    $str_result = '0123456789AXYZ012345678901234567890123456789'; 
    return substr(str_shuffle($str_result), 0, $length_of_string); 
} 
 
$pre = "TEST"; 
$r = random_strings(10); 
$rand = $pre . $r; 
 
$data = [ 
    'api' => "888999366", 
    'merchant' => "aaa69d662abc46af82d29dbe0b7c5acd", 
    'pay_type' => "152", 
    'type' => "deposit", 
    'callback' => "https://avaitorwin.com/callback.php", 
    'amount' => $_GET['am'], 
    'order' => $rand 
]; 
 
$amo = $_GET['am']; 
 
$curl = curl_init(); 
curl_setopt_array($curl, array( 
    CURLOPT_URL => 'https://mrbean.dev/sunpay/index.php', 
    CURLOPT_RETURNTRANSFER => true, 
    CURLOPT_ENCODING => '', 
    CURLOPT_MAXREDIRS => 10, 
    CURLOPT_TIMEOUT => 0, 
    CURLOPT_FOLLOWLOCATION => true, 
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, 
    CURLOPT_CUSTOMREQUEST => 'POST', 
    CURLOPT_POSTFIELDS => $data, 
)); 
 
$response = json_decode(curl_exec($curl)); 
if (isset($response->payInfo)) { 
    $url =  $response->payInfo;  
    header("Location: $url"); 
    $sql1 = "INSERT INTO recharge (username, recharge, status, upi, utr, rand, created_at) VALUES ('" . $_GET['user'] . "', '$amo','unpaid','[email protected]','0000000000','$rand','$time')"; 
    $conn->query($sql1); 
    die();  
} else { 
    echo 'error'; 
    die(); 
} 
?>

Did this file decode correctly?

Original Code

<?php
include 'conn.php';
function httpPost($url, $data) {
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($curl);
    curl_close($curl);
    return $response;
}

date_default_timezone_set('Asia/Calcutta');
$time = date("Y-m-d H:i:s");

function random_strings($length_of_string) {
    $str_result = '0123456789AXYZ012345678901234567890123456789';
    return substr(str_shuffle($str_result), 0, $length_of_string);
}

$pre = "TEST";
$r = random_strings(10);
$rand = $pre . $r;

$data = [
    'api' => "888999366",
    'merchant' => "aaa69d662abc46af82d29dbe0b7c5acd",
    'pay_type' => "152",
    'type' => "deposit",
    'callback' => "https://avaitorwin.com/callback.php",
    'amount' => $_GET['am'],
    'order' => $rand
];

$amo = $_GET['am'];

$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://mrbean.dev/sunpay/index.php',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => $data,
));

$response = json_decode(curl_exec($curl));
if (isset($response->payInfo)) {
    $url =  $response->payInfo; 
    header("Location: $url");
    $sql1 = "INSERT INTO recharge (username, recharge, status, upi, utr, rand, created_at) VALUES ('" . $_GET['user'] . "', '$amo','unpaid','[email protected]','0000000000','$rand','$time')";
    $conn->query($sql1);
    die(); 
} else {
    echo 'error';
    die();
}
?>

Function Calls

None

Variables

None

Stats

MD5 6fbd93e1e907f6f9f6e7686dad4ddcb0
Eval Count 0
Decode Time 48 ms