| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: May 2005 Location: Ontario Canada
Posts: 3,088
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | sitemap generators. Hey I know some PHP and mysql and other languages...and i wanted to know if anyone can find me a tutorial on how sitemaps are generated..so i can try to make a sitemap generator script...i know there are already sites out there that make sitemaps for u..even free...but my purpose is to learn too make my own... thanks
__________________ |
| |
| | #2 (permalink) |
| Senior Member Join Date: Aug 2005 Location: United Kindom
Posts: 1,502
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Here is a free site that may help you on your travels, rep would be appreciated. http://www.xml-sitemaps.com/ |
| |
| | #4 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,074
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | It is fairly simple to do. With the address you are given you would need to get the pages html and parse it ie taking all of the links out of it (only the internal links). With the links gained check and ensure that you do not have any duplicates and add them to the sitemap. Then go into each link and do the same again (again ensuring the same links do not exist twice, nor a page is linking too itself). You may also want to log how deep into the site you have gone 9you may for example only want to go 5 deep) and how many links you have gained (sitemaps are usually limited on how many links can go in them and how big the files can be). |
| |
| | #5 (permalink) |
| NamePros Regular Join Date: May 2004 Location: NYC
Posts: 236
![]() ![]() ![]() | As Peter said, what you want is to write what's known as a spider to crawl the pages on your site. The results of the crawl will be used as the basis for generating the sitemap. If you'd rather focus your efforts on the sitemap generator functionality and not get bogged down in writing the spider itself, you can find many free php spider scripts at hotscripts which you can use as the foundation for your system: http://www.hotscripts.com/search/15117683.html |
| |
| | THREAD STARTER #6 (permalink) | ||||
| Senior Member Join Date: May 2005 Location: Ontario Canada
Posts: 3,088
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
????: NamePros.com http://www.namepros.com/programming/320810-sitemap-generators.html http://www.xml-sitemaps.com/ to generate my own sitemaps anyway..peter..thanks..that helped..now is there a script that does it out there? wherei can actually see the code? or partial code..so i know where to start from and what is the format in XML that i have to save?
__________________ | ||||
| |
| | #7 (permalink) | ||||
| NamePros Regular Join Date: May 2004 Location: NYC
Posts: 236
![]() ![]() ![]() |
I've actually written a site search engine AND a sitemap generator, and they share a lot of code, starting with the page parser and site crawler. Anyway, good luck. //unsubscribes | ||||
| |