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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.