dongshanxun6479 2009-11-26 14:51
浏览 52
已采纳

PHP Mashup中的问题

I have a problem in implementing Mashups in PHP. Now I am using PHP Version5.

I want to fetch flickr photo information from the site. And I think the code is correct. But I always face such errors as follows;

Here is my php code:

<?php
header('Content-Type: text/xml');
?>
<?php
$url="http://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=46566747d88fe250fd631deb0033023a&user_id=64002153@N00";
$url=DOMDocument::load($url);
echo $url->saveXML();
?>

As you can see I am going to fetch remote xml file from flickr site. But I am always stalled by this error:

Warning: DOMDocument::load() [function.DOMDocument-load]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\wamp\www\mashup\k\flickrproxy.php on line 13

Warning: DOMDocument::load(http://...@N00) [function.DOMDocument-load]: failed to open stream: No such file or directory in C:\wamp\www\mashup\k\flickrproxy.php on line 13

Warning: DOMDocument::load() [function.DOMDocument-load]: I/O warning : failed to load external entity "http://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=46566747d88fe250fd631deb0033023a&user_id=64002153@N00" in C:\wamp\www\mashup\k\flickrproxy.php on line 13

You can just think that the remote file does not exist but there it is. link text

This is a accurate xml file as you can see.

  • 写回答

2条回答 默认 最新

查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度