从rss提取封装到图像中

Nog*_*ard 0 php xml

我需要从此机箱中提取图像URL.我怎样才能访问它?

["enclosure"]=> object(SimpleXMLElement) {
    ["@attributes"]=> array(3) {
        ["url"]=> string(81) "http://image.jpg"
        ["length"]=> string(4) "5000"
        ["type"]=> string(10) "image/jpeg"
    }
}  
Run Code Online (Sandbox Code Playgroud)

Rus*_*ias 5

$url = (string) $var['enclosure']->attributes()->url;
Run Code Online (Sandbox Code Playgroud)