我使用此代码从我的帐户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.'>"';
}
有什么问题?感谢
答案 0 :(得分:0)
请试试这段代码吗?
<?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.'>"';
}