dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Dynamic Sitemap Generator

  1. #1
    Join Date
    Jun 2005
    Posts
    332

    Dynamic Sitemap Generator

    Basically it's a thing that can be run from cron, and generates sitemaps which then overwrites what is on the sitemap.xml

    I'm thinking also, can google access a .php file such as sitemap.php and this would generate a sitemap. And because google bot visits this sitemap, this php file would immediately query the site about it's links, thus making this process efficient.

    Is any of these ways feasible? And how do I go about getting making a sitemap generator (that is in a php script), is there any freely downloadable ones out there?

  2. #2
    Join Date
    Sep 2008
    Posts
    27
    if all of your .php files are pages of your site, then your sitemap generator would have to read each directory (look into opendir and readdir on php.net) where those files can live, pulling the filenames into an array. Then you'd have to output those filenames into the proper XML sitemap format, which you can read about at http://www.sitemaps.org/protocol.php.

    I would add a mod_rewrite rule that points /sitemap.xml to /generate_sitemap.php, which is the php script that actually outputs the sitemap. That way you can keep the illusion of a static sitemap file while still using php to dynamically generate it.


    the Fuse PHP MVC Framework
    Why you should be doing your PHP development in FUSE

  3. #3
    Join Date
    Jun 2005
    Posts
    332
    Cool thanks,

    However why use mod rewrite?

    I'm thinking of just using the fopen and etc.
    Last edited by Dragonkai; 09-10-2008 at 02:05 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles