blacknight Posted March 10, 2009 Share Posted March 10, 2009 im using the code $ch = curl_init(); $timeout = 30; // set to zero for no timeout $useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"; curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt ($ch, CURLOPT_USERAGENT, $useragent); $f = curl_exec($ch); curl_close($ch); $xml = simplexml_load_string($f, 'SimpleXMLElement', LIBXML_NOCDATA); to pull xml data from a website and the array im getting has @attributes as a key header.. like this SimpleXMLElement Object ( [@attributes] => Array ( [categoryId] => 92 [dateCompleted] => 2009-02-12-07:00 [desc] => Sample 50 different kinds of Azeroth's delectable dishes. [icon] => inv_misc_food_115_condorsoup [id] => 1832 [points] => 10 [title] => Tastes Like Chicken ) [criteria] => SimpleXMLElement Object ( [@attributes] => Array ( [maxQuantity] => 50 [quantity] => 53 ) ) ) and i cant get this data out of the array i have tryed everything but nothing is working ... any one have any ideas... Quote Link to comment Share on other sites More sharing options...
blacknight Posted March 10, 2009 Author Share Posted March 10, 2009 nm think i have it now... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.