mattN83 Posted June 19, 2009 Share Posted June 19, 2009 I'm doing a cURL of a twitter search atom feed. It's working except for when I try to get the user's image. (I'm pretty new with using objects) This produces a parse error because of the @ sign: $image = $xml->entry[$i]->link[1]->@attributes->href; The $xml object structure looks like this: [entry] => Array ( [0] => SimpleXMLElement Object ( [id] => tag:search.twitter.com,2005:2225612870 [published] => 2009-06-18T17:56:17Z [link] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [type] => text/html [rel] => alternate [href] => http://twitter.com/________/statuses/2225612870 ) ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [type] => image/png [rel] => image [href] => http://________.jpg ) ) ) [title] => ________ [content] => ________ [updated] => 2009-06-18T17:56:17Z [author] => SimpleXMLElement Object ( [name] => ________ [uri] => http://twitter.com/________ ) ) How do I deal with the @ sign? or am I just completely wrong? Link to comment https://forums.phpfreaks.com/topic/162849-curl-sign-parse-error/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.