• Resolved oooorgle

    (@oooorgle)


    I pull in over 100 news, blog, and podcast sites feeds and compile just today’s and yesterdays posts into a page.

    https://oooorgle.com/BeyondTheCorral/news/

    It has been working fine for many years until suddenly this morning all sites return “WP HTTP Error: couldn’t connect to host”.

    Is anyone else having this problem suddenly? I am thinking perhaps it is my hosting provide, though I’ve not heard back yet.

    I also maintain many pages outside of WordPress and grab feeds in a different way on those, which still works fine. I was thinking I would replace fetch_feed with a variation of the coding below if I cannot figure it out.

    If you have any thoughts or suggestions I thank you for taking the time to respond.

    <?php
    // Get rss feed
    function getFeed($feed_url) {
    $content = file_get_contents($feed_url);
    $x = new SimpleXmlElement($content);
    
    foreach($x->channel->item as $entry) {
    echo "<li><b><a href='$entry->link' title='$entry->title'>" . $entry->title . "</a></b></li><br>";
    }
    }
    
    $feed = mysql_escape_string('https://oooorgle.com/BeyondTheCorral/feed');
    getFeed($feed);
    ?>
Viewing 1 replies (of 1 total)
  • Thread Starter oooorgle

    (@oooorgle)

    It was the hosting provider that caused this. Too, regardless if I used fetch_feed or XML the problem was the same as it would not resolve outside my domain.

Viewing 1 replies (of 1 total)
  • The topic ‘fetch_feed suddenly returning "WP HTTP Error: couldn't connect to host"’ is closed to new replies.