parse('https://www.google.com/sitemap.xml'); foreach ($parser->getURLs() as $url => $tags) { echo $url . '
'; } } catch (SitemapParserException $e) { echo $e->getMessage(); }