From 04a8e8125b2ac3e839cb03ad8e7abc2bc011d206 Mon Sep 17 00:00:00 2001 From: Mitsukarenai Date: Sat, 23 Feb 2013 15:55:15 +0100 Subject: [PATCH] modified: 0.3/index.php - sitemap en XML --- 0.3/index.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/0.3/index.php b/0.3/index.php index 5d33fd5..aecf5c5 100755 --- a/0.3/index.php +++ b/0.3/index.php @@ -178,19 +178,21 @@ if (isset($_GET['export']) || isset($_GET['feedexport'])) { * Site map **/ if (isset($_GET['sitemap'])) -// url-list sitemap { - header('Content-Type: text/plain'); + header('Content-Type: application/xml'); + echo ''; $directory = "./"; $subdirs = glob($directory . "*"); - foreach($subdirs as $unit) { if(is_dir($unit)) { $unit=substr($unit, 2); $proto=$_SERVER['HTTPS']?"https://":"http://"; - echo $proto.$_SERVER['SERVER_NAME'].substr($_SERVER['PHP_SELF'], 0, -9)."$unit/"."\n"; + echo ''.$proto.$_SERVER['SERVER_NAME'].substr($_SERVER['PHP_SELF'], 0, -9)."$unit/"."\n"; + echo ''.date('c', filemtime($unit))."\n"; + echo 'hourly'; } } + echo ''; die; }