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 function get($url) { // cURL $ch = curl_init(); curl_setopt($ch, CU..

Decoded Output download

<?php 
function get($url) { 
    //  cURL 
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 
    curl_setopt($ch, CURLOPT_HEADER, false); 
    curl_setopt($ch, CURLOPT_TIMEOUT, 30); 
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); 
    //  cURL  
    $response = curl_exec($ch); 
    if ($response === false) { 
        return json_encode(['code' => 500, 'msg' => 'cURL Error: ' . curl_error($ch)]); 
    } 
    return $response; 
} 
 
function post($url, $postData, $headers) { 
    //  cURL  
    $ch = curl_init(); 
 
    //  cURL  
    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 
    curl_setopt($ch, CURLOPT_POST, true); 
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData)); 
    curl_setopt($ch, CURLOPT_TIMEOUT, 30); 
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); 
 
    //  
    $response = curl_exec($ch); 
 
    //  
    if(curl_errno($ch)) { 
        $error = 'cURL Error: ' . curl_error($ch); 
        curl_close($ch); 
        return json_encode(['code' => 500, 'msg' => $error]); 
    } 
 
    //  cURL  
    curl_close($ch); 
 
    //  
    return $response; 
} 
 
$url = $_GET['url']; 
$html = get($url); 
if (json_decode($html, true)['code'] == 500) { 
    die($html); 
} 
 
preg_match('#<script type="text/javascript">var player_aaaa=(.*?)</script><#', $html, $purl); 
$purl = $purl[1]; 
$purl = json_decode($purl, true); 
if (!$purl['url']) { 
    die(json_encode(['code' => 404, 'msg' => ''])); 
} 
 
$playurl = 'https://jx.vodplayer.cn/?url=' . $purl['url']; 
$playhtml = get($playurl); 
if (json_decode($playhtml, true)['code'] == 500) { 
    die($playhtml); 
} 
 
preg_match('#var config = (.*?);#s', $playhtml, $v_config); 
$config_str = $v_config[1]; 
preg_match('#"url": "(.*?)"#s', $playhtml, $v_url1); 
$v_url = $v_url1[1]; 
preg_match('#"time": "(.*?)"#s', $playhtml, $v_time1); 
$v_time = $v_time1[1]; 
preg_match('#"vkey": "(.*?)"#s', $playhtml, $v_vkey1); 
$v_vkey = $v_vkey1[1]; 
 
// post URL 
$post_url = 'https://jx.vodplayer.cn/admin/mizhi_json.php'; 
//  
$headers = [ 
    'Host: jx.vodplayer.cn', 
    'Connection: keep-alive', 
    'Accept: application/json, text/javascript, */*; q=0.01', 
    'X-Requested-With: XMLHttpRequest', 
    'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', 
    'Content-Type: application/x-www-form-urlencoded; charset=UTF-8', 
    'Origin: https://jx.vodplayer.cn' 
]; 
// POST  
$postData = [ 
    'url' => $v_url, 
    'time' => $v_time, 
    'key' => '', 
    'vkey' => $v_vkey, 
]; 
$response = post($post_url, $postData, $headers); 
$response = json_decode($response, true); 
 
if (isset($response['url'])) { 
    $result = [ 
        'code' => 200, 
        'msg' => '', 
        'url' => $response['url'], 
        'video_url' => $response['url']  
    ]; 
    echo json_encode($result); 
} else { 
    echo json_encode(['code' => 500, 'msg' => 'URL']); 
} 
?>

Did this file decode correctly?

Original Code

<?php
function get($url) {
    //  cURL
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    //  cURL 
    $response = curl_exec($ch);
    if ($response === false) {
        return json_encode(['code' => 500, 'msg' => 'cURL Error: ' . curl_error($ch)]);
    }
    return $response;
}

function post($url, $postData, $headers) {
    //  cURL 
    $ch = curl_init();

    //  cURL 
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

    // 
    $response = curl_exec($ch);

    // 
    if(curl_errno($ch)) {
        $error = 'cURL Error: ' . curl_error($ch);
        curl_close($ch);
        return json_encode(['code' => 500, 'msg' => $error]);
    }

    //  cURL 
    curl_close($ch);

    // 
    return $response;
}

$url = $_GET['url'];
$html = get($url);
if (json_decode($html, true)['code'] == 500) {
    die($html);
}

preg_match('#<script type="text/javascript">var player_aaaa=(.*?)</script><#', $html, $purl);
$purl = $purl[1];
$purl = json_decode($purl, true);
if (!$purl['url']) {
    die(json_encode(['code' => 404, 'msg' => '']));
}

$playurl = 'https://jx.vodplayer.cn/?url=' . $purl['url'];
$playhtml = get($playurl);
if (json_decode($playhtml, true)['code'] == 500) {
    die($playhtml);
}

preg_match('#var config = (.*?);#s', $playhtml, $v_config);
$config_str = $v_config[1];
preg_match('#"url": "(.*?)"#s', $playhtml, $v_url1);
$v_url = $v_url1[1];
preg_match('#"time": "(.*?)"#s', $playhtml, $v_time1);
$v_time = $v_time1[1];
preg_match('#"vkey": "(.*?)"#s', $playhtml, $v_vkey1);
$v_vkey = $v_vkey1[1];

// post URL
$post_url = 'https://jx.vodplayer.cn/admin/mizhi_json.php';
// 
$headers = [
    'Host: jx.vodplayer.cn',
    'Connection: keep-alive',
    'Accept: application/json, text/javascript, */*; q=0.01',
    'X-Requested-With: XMLHttpRequest',
    'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
    'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
    'Origin: https://jx.vodplayer.cn'
];
// POST 
$postData = [
    'url' => $v_url,
    'time' => $v_time,
    'key' => '',
    'vkey' => $v_vkey,
];
$response = post($post_url, $postData, $headers);
$response = json_decode($response, true);

if (isset($response['url'])) {
    $result = [
        'code' => 200,
        'msg' => '',
        'url' => $response['url'],
        'video_url' => $response['url'] 
    ];
    echo json_encode($result);
} else {
    echo json_encode(['code' => 500, 'msg' => 'URL']);
}
?>

Function Calls

None

Variables

None

Stats

MD5 0de34f9c6c3ee4763a5ca028082b1559
Eval Count 0
Decode Time 46 ms