22 April 2009 - 7:13pmVersion 0.3

, , , , ,

I’ve just released version 0.3 of the Google Calendar Feed Parser.  This update was a quick one but definitely deserved a new version number.  Since I wrote the plugin I’ve received feedback from many users indicating that PHP’s file_get_contents() would not work on their hosting provider.  A few of these users posted alternative code that used cURL instead and that fixed the problem for everyone.  Today, the author of onigoetz.ch left this comment on my blog about some work he did to the plugin.  Specifically, he mentioned a function called wp_remote_get().  I wasn’t able to find that function in the documentation for WordPress, but searching for it led me to what I think he may have meant: a function called wp_remote_fopen().  This is essentially a wrapper function for retrieving the contents of a file from a URL and will first try using fopen() and, if that fails, fall back on using cURL.

I’ve updated the code to use that function which should come as a relief to many who were forced to hack at the plugin’s code to get it to work on their hosting provider.  A big thanks to onigoetz.ch for making me aware of that function!

6 Comments | Categories: COSI, Programming

Comments:

  1. DJ NightLife says;
    06 May 2009 - 7:25pm |

    Your plugin conflicts with Exec-PHP…How may I fix that ?

  2. Great plugin. I had some issues with recurring events which eventually led me to a total rewrite using Zend Framework’s GData and Cache packages. I would like to release the code but wanted to discuss that with you first. Please contact me and we can discuss it further.

    Congratulations on your engagement and new job!

  3. Justin says;
    21 Jul 2009 - 9:34pm |

    Mark, I would encourage you to release your rewritten code under the GPL as I did with mine. You’ll find that if you get it loaded into the wp-plugins directory, people will find it quite easily. I haven’t done as much work on mine as I originally intended and still I have hundreds of downloads with little effort on my part. If you’d like, send me a copy of the code and I’ll check it out and perhaps write a post advertising your plugin as an alternative/improvement to my own.

    Thanks for the congratulations! I actually just got married last weekend. :D

  4. Hi,

    I see your post right now.

    Thanks for the thanks :D

    Actually, I didn’t find this function in the documentation either ^^
    I heard about it in some obscure angry-developper-topic talking about shitty-non-working-functions-to-get-pages
    and they talked about how to write a generic function for this and implement it in the wordpress core.

    so they never mention the final name, but I navigated through the code and found it.

    it’s good to see that my work helped some people.

  5. Ow, little correction

    Apparently, there is something in the codex now : http://codex.wordpress.org/HTTP_API

    And I almost forgot : Congratulations for your wedding !!! And “tous mes voeux de bonheur” as we say in the french-speaking part of Switzerland.

  6. Are you still actively maintaining google calendar feed parser? If so I have some updates you’ll probably want to incorporate. Mostly cosmetic, but it makes the output look more like what widgets output, which means the CSS for widgets works out of the box and the calendar looks more like it’s part of the site with less effort.

    Please drop me an email about this so I can get you a diff or we can work out how to handle it going forward.

Add a Comment