} $dir = null; require_once $relpa . 'inc/dir.inc'; sort($dir, 0); reset($dir); /** * update sitemap.xml */ $sitemap_xml = 'sitemap.xml'; $sitemap_xml_gz = 'sitemap.xml.gz'; $sitemap_changefreq = 'monthly'; $sitemap_priority = '0.2'; $s = ''; for ($i = 0; $i < count($dir); $i++) { if (!empty($dir[$i][0])) { $s .= $SitemapGenerator->update_dir_info($relpa, $dir[$i][0], $vars2_site_root, "html", $sitemap_changefreq, $sitemap_priority); } } $SitemapGenerator->write_file($relpa . $sitemap_xml, '<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="' . htmlentities($vars2_site_root) . 'feeds/sitemap.xsl"?> <urlset 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" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>' . htmlentities($vars2_site_root) . '</loc> <lastmod>' . date('Y-m-d\\TH:i:s+00:00') . '</lastmod> <changefreq>daily</changefreq> <priority>' . $sitemap_priority . '</priority> </url> ' . $s . ' </urlset>', "w+"); /** * update sitemap.xml.gz