<?php

if (!isset($_GET['url'])) {
    die("No URL");
}

$url = $_GET['url'];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERAGENT', $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_TIMEOUT, 10); // ⏳ FAST TIMEOUT
$html = curl_exec($ch);

if (curl_errno($ch)) {
    echo "ERROR: " . curl_error($ch);
    curl_close($ch);
    exit;
}
curl_close($ch);

// Show data as-is (NO HEAVY REWRITE)
header("Content-Type: text/html; charset=UTF-8");
echo $html;
?>