View Single Post
Old 12-23-2005, 12:50 PM  
luv$
!$!$!$!$!$!$!$!$!$!$
 
luv$'s Avatar
 
Join Date: Dec 2004
Location: Paper Street
Posts: 6,158
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.

Ok, couple of questions - do I save it as a .txt, .html, .xml and do I name it anything specific?

And then, do I put that in every directory I want a sitemap for, like my forums folder or by placing it in my root htdocs it covers everything?

Thanks man
__________________
Domain Auction - now till 12:01AM on the 2nd...

Paper Streeeeeeeeeeeeeeeeeeeeeeeeeeeeeeet Cash


The Real Workout - Innocent High - Oye Loca - Her Freshman Year - Solo Interviews - This Girl Sucks. ** HQ Fresh ORIGINAL sites.
luv$ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote