Possible Duplicate:
Creating an XML sitemap with PHP
I'm trying to build an application where a user enters his website URL and gets the XML sitemap. I'm getting links, where a user gets his XML sitemap of his website by placing a file in the directory of his website which generates sitemap. But I want to generate it for any given URL. Can I get the directory structure of any given website using php? Any help would be appreciated.