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 // URL of the API $url = "https://play3.huaylike.live/ms"; function fetchData()..

Decoded Output download

<?php 
// URL of the API 
$url = "https://play3.huaylike.live/ms"; 
 
function fetchData() { 
    global $url; 
 
    // Data to be sent to the API 
    $data = array( 
        "operationName" => "getLottoResultYeeKee", 
        "variables" => array( 
            "data" => array( 
                "code" => "powerball5g", 
                "date" => "2024-01-02", 
                "round" => 0 
            ) 
        ), 
        "query" => "query getLottoResultYeeKee(\$data: InputGetLottoResultYeeKee!) { 
            getLottoResultYeeKee(data: \$data) { 
                status 
                message 
                name 
                roundInDate 
                data { 
                    code 
                    name 
                    nameSub 
                    bon3 
                    bon2 
                    lang2 
                    __typename 
                } 
            } 
        }" 
    ); 
 
    // Initialize cURL session 
    $ch = curl_init($url); 
 
    // Set cURL options 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($ch, CURLOPT_POST, true); 
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); 
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); 
 
    // Execute cURL session and get the response 
    $response = curl_exec($ch); 
 
    // Check for errors 
    if ($response === false) { 
        die('Error: ' . curl_error($ch)); 
    } 
 
    // Close cURL session 
    curl_close($ch); 
 
    // Decode the JSON response 
    $result = json_decode($response, true); 
 
    return $result; 
} 
 
function processResults($result) { 
    foreach ($result['data']['getLottoResultYeeKee']['data'] as $dataItem) { 
        // Check if 'bon3' is not 'xxx' and 'lang2' is not 'xx' 
        if ($dataItem['bon3'] !== 'xxx' && $dataItem['lang2'] !== 'xx') { 
            Call($dataItem); 
        } 
    } 
} 
 
function Call($dataItem) 
{ 
    $bon3 = $dataItem['bon3']; 
    $lang2 = $dataItem['lang2']; 
 
    $i = 1; 
    $resBon1 = substr($bon3, 0, 1); 
    $resBon2 = substr($bon3, -1); 
    $lang = substr($lang2, 0, 1); 
    $res1 = $resBon1 + $resBon2; 
    $res1 = ($res1 == 10) ? 0 : $res1; 
    $res2 = substr($res1, -1); 
    $res3 = $res2 + $lang; 
    $res4 = substr($res3, -1); 
    $total = $res4 + $i; 
    $total = ($total == 10) ? 0 : $total; 
 
     
    echo "
   
"; 
    echo "----- FB : AUUTY -----
"; 
    echo "   {$dataItem['nameSub']}
"; 
    echo "      $res4 , $total 
"; 
    echo "   
"; 
    echo "   3  : {$dataItem['bon3']}
"; 
    echo "   2  : {$dataItem['lang2']}
";     
    echo "--------------------------------------
"; 
} 
 
// Infinite loop with a minute interval 
while (true) { 
    $result = fetchData(); 
    processResults($result); 
 
    // Sleep for 2 minutes 
    sleep(30); 
} 
?> 

Did this file decode correctly?

Original Code

<?php
// URL of the API
$url = "https://play3.huaylike.live/ms";

function fetchData() {
    global $url;

    // Data to be sent to the API
    $data = array(
        "operationName" => "getLottoResultYeeKee",
        "variables" => array(
            "data" => array(
                "code" => "powerball5g",
                "date" => "2024-01-02",
                "round" => 0
            )
        ),
        "query" => "query getLottoResultYeeKee(\$data: InputGetLottoResultYeeKee!) {
            getLottoResultYeeKee(data: \$data) {
                status
                message
                name
                roundInDate
                data {
                    code
                    name
                    nameSub
                    bon3
                    bon2
                    lang2
                    __typename
                }
            }
        }"
    );

    // Initialize cURL session
    $ch = curl_init($url);

    // Set cURL options
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));

    // Execute cURL session and get the response
    $response = curl_exec($ch);

    // Check for errors
    if ($response === false) {
        die('Error: ' . curl_error($ch));
    }

    // Close cURL session
    curl_close($ch);

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

    return $result;
}

function processResults($result) {
    foreach ($result['data']['getLottoResultYeeKee']['data'] as $dataItem) {
        // Check if 'bon3' is not 'xxx' and 'lang2' is not 'xx'
        if ($dataItem['bon3'] !== 'xxx' && $dataItem['lang2'] !== 'xx') {
            Call($dataItem);
        }
    }
}

function Call($dataItem)
{
    $bon3 = $dataItem['bon3'];
    $lang2 = $dataItem['lang2'];

    $i = 1;
    $resBon1 = substr($bon3, 0, 1);
    $resBon2 = substr($bon3, -1);
    $lang = substr($lang2, 0, 1);
    $res1 = $resBon1 + $resBon2;
    $res1 = ($res1 == 10) ? 0 : $res1;
    $res2 = substr($res1, -1);
    $res3 = $res2 + $lang;
    $res4 = substr($res3, -1);
    $total = $res4 + $i;
    $total = ($total == 10) ? 0 : $total;

    
    echo "\n   \n";
    echo "----- FB : AUUTY -----\n";
    echo "   {$dataItem['nameSub']}\n";
    echo "      $res4 , $total \n";
    echo "   \n";
    echo "   3  : {$dataItem['bon3']}\n";
    echo "   2  : {$dataItem['lang2']}\n";    
    echo "--------------------------------------\n";
}

// Infinite loop with a minute interval
while (true) {
    $result = fetchData();
    processResults($result);

    // Sleep for 2 minutes
    sleep(30);
}
?>

Function Calls

curl_init 1
fetchData 1

Variables

$url https://play3.huaylike.live/ms
$data [{'key': 'operationName', 'value': 'getLottoResultYeeKee'}, {'key': 'variables', 'value': [{'key': 'data', 'value': [{'key': 'code', 'value': 'powerball5g'}, {'key': 'date', 'value': '2024-01-02'}, {'key': 'round', 'value': 0}]}]}, {'key': 'query', 'value': 'query getLottoResultYeeKee(\\$data: InputGetLottoResultYeeKee!) { \n getLottoResultYeeKee(data: \\$data) { \n status \n message \n name \n roundInDate \n data { \n code \n name \n nameSub \n bon3 \n bon2 \n lang2 \n __typename \n } \n } \n }'}]

Stats

MD5 a30ca5de49b8a8595f15ad8a5ef6abd4
Eval Count 0
Decode Time 72 ms