Php 将附件从rss提要提取到图像中
我需要从这个附件中提取图像url。我如何访问它Php 将附件从rss提要提取到图像中,php,xml,Php,Xml,我需要从这个附件中提取图像url。我如何访问它 ["enclosure"]=> object(SimpleXMLElement) { ["@attributes"]=> array(3) { ["url"]=> string(81) "http://image.jpg" ["length"]=> string(4) "5000" ["type"]=> string(10) "image/jpeg" }
["enclosure"]=> object(SimpleXMLElement) {
["@attributes"]=> array(3) {
["url"]=> string(81) "http://image.jpg"
["length"]=> string(4) "5000"
["type"]=> string(10) "image/jpeg"
}
}
$url = (string) $var['enclosure']->attributes()->url;