Archive for the ‘Uncategorized’ Category

Fix your PayPal PHP IPN script

Thursday, January 23rd, 2014

In October 2013  PayPal changed a bit of their server infrastructure. They announced it well, with multiple warnings about requiring the Host: header to be sent with verification requests.

Now suddenly my PHP IPN scripts did not work anymore, data was coming in but nothing got verified.

Checking the response quickly points out that PayPal is now redirecting requests to use HTTPS, but our old scripts are still based on years old example code using fsockopen on port 80.  fsockopen doesn’t know about HTTP redirects.

So, to get your PHP PayPal IPN notifications working again, you should replace the fsockopen line with:

$fp = fsockopen('ssl://', 443, $errno, $errstr, 30);

Update: A few days later things stopped working again… it seems PayPal now adds a newline character behind the VERIFIED response, messing up the sample script. This can be resolved by replacing:

$res = fgets ($fp, 1024);


$res = trim(fgets ($fp, 1024));

Posting Regularly

Tuesday, December 28th, 2010

As you have seen,  I’m way better than before in posting regularly on this blog.  I’m still doing the same things, so there is not more to write about. However, I do follow a new system for posting.    In the past I would post when I was inspired to do so.  After a while inspiration dries up and you run into the ‘I have to write something…. ‘ problem and it will start to go downhill soon from there.

My new approach is to decouple inspiration,  writing and posting.   Instead of  going from idea to post in say 30 minutes.  I now just write down everything that could potentially be a blog post, without putting the burden of actually writing it on myself.  So I just create a draft post with the title and whatever flows easily from the mind.   Sometimes it is just the title,  at other times it is almost a full post.Because I do not force myself to write the whole post, I’ve collected a lot of drafts that could grow into a post.

At other times I might not feel inspired at all, but I do feel like getting something done. This the time to finish posts. Maybe find some relevant links or creating an illustration. When done, I either schedule the post  or let it rest for a bit until I feel like it is time to post again.

To make sure that I don’t forget about posting, I’ve also set up a repeating item in my Google calendar.  With the drafts already there, it takes no effort at all to actually get something out there if I didn’t already.

Using this approach I have gone from a single idea to post action  to a buffered approach that’s can cope much better with prolonged lack of inspiration or plain laziness.  It does take a bit of discipline to not immediately post what has been written, but it does lead to a much more consistent post rate.

Analyzing the Pomodoro Method

Thursday, December 23rd, 2010

In earlier posts I summarized the Pomodoro Method for time management.  Since than, I have to admit,  I wasn’ t able to persist in using it on a daily basis.  However, I did find it to be very useful to prevent me from diving into lengthy spans of procrastination and low-productivity.   Even one or two days of it, give back the feeling of actually getting stuff done. This is often enough to get everything back on track.

An important part of the Pomodoro Method is to have dedicated time assigned for a specific task, ensuring your full attention and focus. However, I believe this method mainly works for me because it decouples your breaks from your natural breaks in attention. On a normal working day you need to take breaks. Usually you will take them at times you mind starts to wander, energy is low or things start to get painful. You stopped working because you don’t feel like working anymore. Making it very hard to find motivation to start up again: it wasn’t going well when you started this break and now you don’t feel any better.

With the Pomodoro method, taking a break is fixed. Because you are forced to take it when you are in the middle of something, the feeling is entirely different.  At first I  felt ridiculous to take the break now, instead of just finishing your task.  However, after a while, I learned that this feeling ensures that you can easily start up again after a break. As you were making good progress before taking the break, you are eager to continue and finish that task at hand.

A New Office Chair

Sunday, September 19th, 2010

I’ve decided that I no longer like my  10 year old Ikea office chair.  So now I’m looking for something new and better. Unfortunately there is no clear winner,  for all chairs there can be found very positive and very negative reviews. Furthermore,  just sitting in a chair for a few minutes probably won’t tell me whether it is any good in the long term. And a pleasant chair, might not even mean it is actually good for you.  Anyway, I’m still doing research, which I’m publishing on a separate blog: High Back Office Chair .   Some chairs I’m currently investigating:

  • Aeron Mirra
  • RH Logic 400
  • Humanscale Freedom
  • Vitra Headline
  • Ikea Verksam  (as the reasonable and cheap base choice)

Suggestions are more than welcome.

SEOmoz Pro Account Review

Sunday, July 26th, 2009

SEOmoz seemed to have some nice tools,  so  we decided to give it’s PRO account a try.     And indeed the tools are quite nice.   I especially like the idea of Linkscape and  Ranktracker.    Linkscape shows you exactly what pages are linking to your site.  And better: you can easily filter them to see which do not come from your own website, which ones have  nofollow on them, etc.     Ranktracker does what you expect from the name:   track  search engine positions for different keywords over time.    There is a bunch of other tools as well, but those are not really impressive and maybe even a bit outdated.

However,  the site and tools are SLOW,   a significant portion of my requests  fails or take ages.     I’ve tested it during multiple days, so it’s not a one-time thing.    In my opinion  as a programmer I’m better of reproducing the tools with some small scripts,  because unresponsive sites really annoy me, especially if I pay $79 a month for them.     I do not think  I lost that first payment though, because there is also some great paid content over there.  But that’s not nearly enough to justify paying  $79 every month.

An Idea I do like it that I can take a questionnaire after I cancel  and get another week for free.   Because on our sites people usually don’t want to take the effort to tell us why they cancel.

Blank Canvas

Thursday, February 26th, 2009

Almost two years ago  I got some paint and a canvas for my birthday, but I never got around doing something with it.  Until today:

I think it came out a bit weird, but I’m happy with it for a first (and quick) effort.

Business Card

Tuesday, February 24th, 2009

I had a design for our business card lying around for more than a year.   There was a nice offer from VistaPrint so I thought I’d give it a go:

It’s quite ok, but I think having the blue printed as a single color, instead of using CMYK would give it a better look.  Also I would really like to put the illustration we have on our website  on the back, to make it a bit less formal.

Anyway,  I don’t really need business cards,  so probably the next edition will not be printed soon 🙂

Twitter, I like it

Tuesday, February 10th, 2009

What I never expected a few months ago: I actually like twitter.    Although it seems like an overflow of non-interesting information at first sight,  it’s actually pretty useful.  For me it’s especially keeping up to date with new developments without having to read through tons of lengthy blog posts.      For myself I try to keep a schedule of at least one twit a day. That should not be to difficult to stick to.  Finally I’ve added the feed to this blog (bottom right).

First day of twitter

Monday, February 2nd, 2009

I gave twitter another chance.  I created an accounts months ago, but never got past the first message.  I reconsidered it’s usage yesterday.   Why?

1:  I like the Facebook status updates and a lot of people seem to update them from twitter, so why wouldn’t I like twitter as well?

2: At MovingLabs we build software for the web,  how can we build the best if we don’t understand what’s going on?

3: I was (re)reading a discussion about the usage of twitter for marketing purposes. It seems to fit in perfectly.

So after my first day I think I’m going to persist to use it for a while.  I especially like the concept that you can follow someone without the need for some bidirectional (friendship) relation.

Facebook catching on in the Netherlands

Sunday, February 1st, 2009

Facebook is catching on everywhere for some time now, but in the Netherlands Hyves is still the  major player.  I had a Facebook profile for some time, mostly for exploring it’s application platform. A lot of people I know have some presence over there for some time. However the last few months I see a change:  people are starting to use it!     People I know are starting to join groups, updating their status and uploading photos. And, very important:  my sister has an account, meaning it is way past the early adoption by tech-interested men.

I believe it’s just a matter of time before  Facebook will become more important than Hyves.   First of all:  most people past 16 have a world outside The Netherlands too.   Furthermore,  Facebook doesn’t look like a highschool project gone-wrong, so you can actually connect with someone above 30 without silently laughing at them.   While at Hyves it really looks very very wrong if a parent or a teacher joins.   So I believe Hyves will probably become  for kids even more than it is now and it’s empire will sink like the previous dutch profile site that seemed unbeatable:  (do you even remember it?)