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,

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.