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?
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
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.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)