I am developing a webapp using codeigniter (mvc) and php. I was wondering how do I create a sitemap for search engines when my contact is dynamic? Are there best practices for this, or is there a way to automate the process? I ask because content will be constantly and rapidly added so I'd like the sitemap be recent. Thanks
Update: to help answer my question, the type of site that I am creating is a public blog type site where users post articles.
Update2: Just to elaborate on my confusion: I may not understand exactly how a sitemap is structured. On a site like stackoverflow for example, as users add new questions (and thus, new pages get created) does the sitemap change and need to be resubmitted? How important is it for a site like this one to even have a sitemap?
Even though your content is dynamic, you want your sitemap to be static. Sure, update the sitemap once a day if you want, OR update it whenever you post a new blog entry... but don't try to create it at the time that it's requested. That'll be a performance nightmare.
I think Stackoverflow's sitemap is updated daily. It contains the 50,000 most recently changed pages. The sitemap helps with SEO (search engine optimization).
Recipe for sitemap generation over here