View Single Post
Old 12-23-2005, 12:44 PM  
Basic_man
Programming King Pin
 
Basic_man's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: Montreal
Posts: 27,360
Quote:
Originally Posted by SmokeyTheBear
Code:
 <?
    //Do not edit the following, it's compul
    //     sory
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
    <urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\" 
    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" 
    xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 
    http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">";
    //Enter your website URL below
    $site = "http://www.ashburnham-insurance.co.uk/";
    //Map the directory that this file is in
    //     
    map(".", $site);
    //Map a higher directory such as yoursit
    //     e.com/articles/old/
    map("articles/old", $site);
    //Do not edit the function below
    function map($dir, $site){
    $dir = opendir($dir); 
    while(($file = readdir($dir)) !hahahaha false) 
    { 
    if($file != "."){
    if($file != ".."){
    //Make sure were only outputing file's a
    //     nd not directories
    if(strpos($file, ".") != ""){
    echo "<url>$site$file</url>\r\n"; 
    }
    }
    }
    } 
    closedir($dir);
    }
    echo "</urlset>";
    ?>
drop in directory and it will create a google sitemap for you.
How does that work exactly ?
__________________
UUGallery Builder - automated photo/video gallery plugin for Wordpress!
Stop looking! Checkout Naked Hosting, online since 1999 !
Basic_man is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote