blesseld Posted June 8, 2010 Share Posted June 8, 2010 Hey All, I am trying to finish the last step of my site map generator for a template I built. Here is the Process: User Submits meta info and a URL (stored in a .php file) Sitemap tool loops through and grabs the URL's and adds them to a list (to be used in the sitemap) User copies list of URL's and pastes them into the tool Outcome is: <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.dev.domain.com/ </loc> <priority>1</priority> </url> <url> <loc>http://www.dev.domain.com/page-2.php </loc> <priority>0.83</priority> </url> <url> <loc>http://www.dev.domain.com/page-3.php </loc> <priority>0.67</priority> </url> <url> <loc>http://www.dev.domain.com/page-4.php</loc> <priority>0.5</priority> </url> </urlset> All I am trying to do now is have a form so the user can copy the above paste it into the text box and hit submit. That would open the sitemap.xml file and paste in the already formatted xml. Is this possible? Thanks for any help, Quote Link to comment https://forums.phpfreaks.com/topic/204215-trying-to-save-generated-xml-to-a-sitemapxml-file/ Share on other sites More sharing options...
ignace Posted June 8, 2010 Share Posted June 8, 2010 You could let the user copy-paste http://www.dev.domain.com/ and then using crawling techniques you would find internal links and using DomDocument you can then output it as XML. Quote Link to comment https://forums.phpfreaks.com/topic/204215-trying-to-save-generated-xml-to-a-sitemapxml-file/#findComment-1069650 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.