 <p>The code works fine for me, too. As Justin suggested, you're probably overwriting your extracted data.</p> <p>May I suggest less-redundant code? For example:</p> <pre><code>$urls = array('http://www.wowarmory.com/character-sheet.xml?r=Crushridge&amp;n=Thief', 'http://www.wowarmory.com/character-sheet.xml?r=Ursin&amp;n=Kiona'); $browser = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 YFF3 Firefox/3.0.1'; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, $browser); foreach ($urls as $url) { curl_setopt($ch, CURLOPT_URL, $url); $result20 = curl_exec($ch); // Extract the values out of the xml here (to separate variables). } curl_close($ch); </code></pre>