我正在使用
PHP的“simplexml_load_file”从Flickr获取一些数据.
我的目标是获取照片网址.
我能够得到以下值(分配给PHP变量):
codewrecker posted a photo:
我怎样才能提取它的这一部分?
http://farm3.static.flickr.com/2298/2302759205_4fb109f367_m.jpg
万一它有帮助,这是我正在使用的代码:
$xml = simplexml_load_file("http://api.flickr.com/services/Feeds/photos_public.gne?id=19725893@N00&lang=en-us&format=xml&tags=carousel");
foreach($xml->entry as $child) {
$flickr_content = $child->content; // gets html including img url
// how can I get the img url from "$flickr_content"???
}
?>