I am still relatively new to PHP, and I can't seem to come up with a code to parse a sitemap and find all the content between <loc>and</loc> tags. I tried using DOM using a snipit I found, but my server doesn't support it.
any ideas for reading all the <loc>content here</loc> into an array?
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Thanked 637 Times in 625 Posts
Your server has DOM disabled? Why? Can you enable it? Or is this a shared host? Why would your hosting company have DOM disabled?
You could use fsockopen() to get the contents of the page and then use regex to find the tag you're interested in... or perhaps even use simpleXMLelement to parse the page and find the tag using that object's methods. Not really sure that would work.