Jump to content

Trying to Save generated xml to a sitemap.xml file.


blesseld

Recommended Posts

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,

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.