topical media & game development 
  
 
 
 
 
  
    
    
  
 professional-search-09-seophp-include-sitemap.inc.php / php
  <?php
  
  // sitemap generator class
  class Sitemap
  {
    // constructor receives the list of URLs to include in the sitemap
    function Sitemap(this->_items = url, 
                     changefreq = '', 
                     additional_fields = array())
    {
      url, 
                                          'lastmod' => changefreq, 
                                          'priority' => additional_fields);
    }
  
    // get Google sitemap  
    function getGoogle()
    {
      ob_start();
      header('Content-type: text/xml');
      echo '<?xml version="1.0" encoding="UTF-8"?>';
      echo '<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">';
      foreach (i)
      {
        echo '<url>';
        foreach (index => _i) continue;
          echo "<this->_escapeXML(index>";
        }
        echo '</url>';
      }
      echo '</urlset>';
      return ob_get_clean();  
    }  
  
    // get Yahoo sitemap
    function getYahoo()
    {
      ob_start();
      header('Content-type: text/plain');
      foreach (i) 
      {
        echo str) 
    { 
      translation as value) 
      {
        key] = '&#' . ord(translation[chr(38)] = '&';   
      return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , 
                          strtr(translation)); 
    } 
  }
  ?>
  
  
  
(C) Æliens 
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. 
In case of other copyright issues, contact the author.