PHP class which generates sitemaps compatible with protocol Sitemap 0.90. Class aims to cover specification in 100% and be as simple as possible. Usage examples can be found on phpclasses.org.
Class features:
- Full compatibility with UTF-8
- Support for Sitemap index
- Handling up to 50,000,000 URLs
- Support for robots.txt files
- Automatic notification for Google, Yahoo!, Ask and Bling search engines.
- Support for Yahoo App ID
- Support for GZip
Link to code on PHPClasses: Sitemap Generator
Great class! I found that in phpclasses.org.
I have a question: when the 50000 limit is touched, automaticaly the script generates „sitemap2.xml” (and so on) & updates the sitemap-index.xml?
Thank you!
Yes, exactly. It will generate successive sitemap files and put it all together to sitemap-index. You can test it by changing
to small value. Advanced example shows it.
Oh, great! Very thank you for the answer! 😀
sorry, but i am unable to run your class
Hello.
Please give us more details.
Code examples or some error message.
Thanks.
Hello,
Your class is very good, but i have a question :
How we do to generate sitemaps when we have several millions of urls ? Without exhausted the allowed memory.
Regards.
Hi.
Did you do some tests?
To be honest, i don’t have idea how class will act in case of millions records.
Yes i did some tests this morning, with around 500,000 urls, and i’ve got a fatal error for the allowed memory.
I will try this afternoon to do a system to write urls in file by parts, this will take less memory.
Hello, are you planning to create a Sitemap Qenerator for mobile sitemaps?
See here: http://www.google.com/support/webmasters/bin/topic.py?hl=en&topic=8493
Thank you
Andrea
Hi, I tried this class and it failed after 60000 url generated for allowed memory.
I think it should write to file during the addurl method.
If are planning to modify it let me know.
I found also another bug in the robots function where sitemap filename is written like *.gz.gz
However this functionalities where exactly what i was looking for.
thanks.
Naprawdę wyśmienicie u ciebie! 😉 Thx!! Nara, no i wierzę w rewanż!
😉