Jump to content

External XML Feed -- Server configuration issue?


Recommended Posts

Hello, all. I'm currently building my company's intranet site, and I'm trying to implement an XML/RSS news feed to make a news ticker across the bottom. However, it seems as though my server is unable to connect to outside sources.

 

Here's a sample of the code and subsequent error message I'm receiving:

 

Code:

<?
$feed = fopen("http://rss.cnn.com/rss/cnn_topstories.rss", "r");
echo $feed;
?>

 

Error:

Warning: fopen(http://rss.cnn.com/rss/cnn_topstories.rss) [function.fopen]: failed to open stream: Connection refused in /www/zendcore/htdocs/Intranet/slideshownewsfeed2_bottom.php on line 21

 

I've tried enabling allow_url_include and allow_url_fopen in the php.ini file, but that hasn't helped. I've also tried using cUrl, and even a simple include, both of which gave me a similar error message. So I have to think it might be a server config issue, as opposed to a PHP config issue. Does anyone have any idea what might be causing this?

 

Thanks in advance!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.