简体   繁体   English

如何使用RSS Feed从Picasa中获取Picasa图像

[英]How to get Picasa images from Picasa using RSS Feed

I use this code for get all images from my account picasa but without result : 我使用此代码从我的帐户picasa获取所有图像,但没有结果:

$content = file_get_contents("https://picasaweb.google.com/data/feed/base/user/107745136468823194427?alt=rss&kind=photo&hl=fr&imgmax=1600");
$x = new SimpleXmlElement($content);
foreach($x->channel->item as $entry => $value){

    $title  = $value->title;
    $image  = $value->enclosure->attributes()->url;
    $urlimg = $image[0];
    echo '<img src="'.$urlimg.'>"';
}

What the problem ? 有什么问题? Thanks 谢谢

Can you try with this code please? 您可以尝试使用此代码吗?

<?php 
$content = file_get_contents("https://picasaweb.google.com/data/feed/base/user/107745136468823194427?alt=rss&kind=photo&hl=fr&imgmax=1600");
$x = simplexml_load_string($content);
foreach($x->channel->item as $entry => $value){

    $title  = $value->title;
    $image  = $value->enclosure->attributes()->url;
    $urlimg = $image[0];
    echo '<img src="'.$urlimg.'>"';
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM