Skip to content

Instantly share code, notes, and snippets.

@LeffeBakedBird
Last active September 5, 2017 13:22
Show Gist options
  • Save LeffeBakedBird/4ca2f6ff5cce224cc06f9a8765947c16 to your computer and use it in GitHub Desktop.
Save LeffeBakedBird/4ca2f6ff5cce224cc06f9a8765947c16 to your computer and use it in GitHub Desktop.
<?php
$DomDocument = new DOMDocument();
$DomDocument->load('sitemap.xml');
$DomNodeList = $DomDocument->getElementsByTagName('loc');
foreach($DomNodeList as $url) {
echo $url->nodeValue;
echo "<br/>";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment