WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Google Calendar Feed Parser] If your host disables file_get_contents for URLs…

[Plugin: Google Calendar Feed Parser] If your host disables file_get_contents for URLs…

  • REPLACE:
    $xmlstr = file_get_contents($feed_url);

    ————

    WITH:
    $ch = curl_init();
    $timeout = 5; // set to zero for no timeout
    curl_setopt ($ch, CURLOPT_URL, $feed_url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $xmlstr = curl_exec($ch);
    curl_close($ch);

    ————

    Justin, if you see this, I tried with 3 different browsers to comment on the feed parser post (and the post about your spam filter) and was unable to do so.

    Good work on the plugin though!

    http://wordpress.org/extend/plugins/google-calendar-feed-parser/

  • The topic ‘[Plugin: Google Calendar Feed Parser] If your host disables file_get_contents for URLs…’ is closed to new replies.