-
-
Save LeffeBakedBird/cf71f97777f12f797e1ff0634b29d018 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$urls = array(); | |
$DomDocument = new DOMDocument(); | |
$DomDocument->load('sitemap.xml'); | |
$DomNodeList = $DomDocument->getElementsByTagName('loc'); | |
foreach($DomNodeList as $url) { | |
echo $url->nodeValue; | |
$headers = get_headers($url->nodeValue); | |
$code = $headers[0]; | |
echo $code; | |
echo "<br />"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment