So I’m qualified!

Aah it feels good to say I’m finally Google Adwords qualified! I got my Google Analytics qualification in 2011 but never bothered to go for the Adwords qualification. Then I got an invitation from Google for their Google Engage event (pics) in Brussels and we received some free coupons. Thanks Google! 🙂


A few tips for people that are planning to take this exam.

The Google Adwords certification program is divided into 2 examens (1 fundamental + 1 advanced exam) on which you have the have at least 85%. Both exams have +- 110 questions which you’ll have to answer within 2 hours.

Revising everything you know is crucial for succeeding since there are alot of weird/vague questions which you’ll only know when you’ve read the docs.

Good luck!

New project: Souschef – Social Food Platform

After a year of development we finally launched, a social food platform for foodies located in Belgium/Holland.
Souschef has a vast database of recipes and restaurants, all linked together by our usergroup, giving it a final social touch.

Check it out and leave your feedback :).

New project: PushControl

PushControlI recently launched a new project called PushControl – . Basicly what it does is sending out (free) notifications to users with information on police controls in Belgium, based on their keywords.

Because PushControl uses push notifications via Notifo and Pushover (php class) next to sms, email and twitter notifications,almost everyone will be able to receive notifications. Even folks with a Nokia 3210 (do they still exist?)! Signup is free via Facebook. PushControl is actually a facebook app / mobile webapp (responsive) / normale website.

php-pushover, a PHP class for sending push notifications to iOS & Android

So I’ve been using Notifo for a while now and I must say, lovely service. Unfortunately, they will be closing down..

In my quest for a new push notification provider, I stumbled upon Pushover.
Pushover is by far the only service that can deliver (free) push notifications to both iOS and Android platforms, with a simple API, and a lot of cool options. Even authentication is very easy (not like Prowl). Have a look at their api docs.

Here’s the php class I wrote for Pushover:

And here’s how you use it:

$push = new Pushover();
$push->setToken('app token goes here');
$push->setUser('user token goes here');
$push->setTitle('Hey Chris');
$push->setMessage('Hello world! ' .time());
$push->setUrlTitle('cool php blog');
$go = $push->send();

Good luck! And let me know which cool projects you used this for! 🙂

Opencart send fax on order

In some cases, it’s useful to fax your orders to the store as soon as an order is placed. Now many people will think this is very hard, but in fact, it’s very easy to accomplish this. Thank god for API’s!

Browse your Opencart folder and go to /catalog/model/checkout/order.php, line 370 (after the following code), and add your fax code. If you put the code here, you can reuse the default HTML mail Opencart will send to your client (which includes all the order info).

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/mail/order.tpl')) {
	$html = $template->fetch($this->config->get('config_template') . '/template/mail/order.tpl');
} else {
	$html = $template->fetch('default/template/mail/order.tpl');

I’d like to use Interfax since they provide a very easy PHP API. Only 1 requirement, you’ll need SOAP. Now add this code:

	/**************** Settings begin **************/
	$username = ''; // Enter your Interfax username here
	$password = ''; // Enter your Interfax password here
	$faxnumber = ''; // Enter your designated fax number here in the format +[country code][area code][fax number], for example: +12125554874
	$texttofax = $html; // Enter your fax contents here
	$filetype = 'HTML'; // If $texttofax is regular text, enter TXT here. If $texttofax is HTML enter HTML here
	/**************** Settings end ****************/
	$client = new SoapClient("");
	$params->Username  = $username;
	$params->Password  = $password;
	$params->FaxNumber = $faxnumber;
	$params->Data      = $texttofax;
	$params->FileType  = $filetype;
	$faxResult = $client->SendCharFax($params);

Et voila. The email sent to your client for notification will also automaticly be faxed to the given fax number.

Automatically create .m3u playlists with bash (for QNAP iTunes Server)

One of the cool features of my new QNAP 412 Turbo Nas is iTunes Server. This basicly allows you to create playlists, and share them among your home network. I haven’t figured out yet if it’s also possible to sync these to your iOS devices, but we can atleast (easily) share our music library to all our devices.

Qnap comes with so called ‘smart playlist’, but I don’t like those. I prefer my playlists per CD or folder. In order for this to work we’ll have to create an m3u playlist for EACH folder you want to share, this can be a daunting task.. Here’s a way to automate this. This script uses recursion to find all audio files in the parent folder + child folders. Since iTunes uses the m3u’s filename as playlist title, this script will use the folder name for this.

SSH to your server (QNAP default user = admin), and cd yourself to your music folder. Now create a bash script and give it execute permission:

cd /Qmultimedia/Music/
chmod +x

Now enter the following code. I found this neat script here, and stripped it down to the necessary commands, and implemented the removal of old m3u’s (in case you delete/update Music folders).



/opt/bin/find . -type f -name "*.m3u" -exec rm -f {} \; # remove all existing m3u's

rm -f $M3Ulist

indexCurrDir ()
FileList="" # initialize empty variable FileList
for FileTypes in "ogg" "mp3" "flac" "wav" # loop over file types.
FindFiles=$(/opt/bin/find $(pwd) -type f -iname "*.$FileTypes" | sort)

if [ "${#FileList}" != "0" ] # do not write m3u file if file list is empty
echo "$CurrDir"
m3uName=$(basename $CurrDir)

echo "Writing m3u playlist."
echo "$FileList" > "${m3uName}.m3u"
echo "$CurrDir/${m3uName}.m3u" >> "$M3Ulist"

AllDirs=$(/opt/bin/find $(pwd) -type d | sort)

for Directory in $AllDirs
cd "$Directory"

exit 0

Now you can easily create m3u’s for your complete music folder by running:


You can also put this in a cronjob for automating things. Here’s more info on cronjobs on a QNAP.

Subliminal on QNAP

Installing Subliminal

So installing Subliminal on QNAP (in my case, a QNAP 412 Turbo Nas) isn’t out of the box with qpkg’s like for example SickBeard, CouchPotato or SABnzbd. For all who’s wondering, these tools are the ultimate combination for managing and updating your media library.

Subliminal is the successor of Periscope, also written in Python. It allows your to download subtitles for movies/tv shows fairly easy. Here’s a quick install guide.

First, connect to your NAS via SSH with the ‘admin’ user.
Next, make sure you update your IPKG’s + add some new ones:

ipkg update                             
ipkg upgrade                            
ipkg install git                         
ipkg install textutils	                
ipkg install python27	                
ipkg install py27-setuptools	    
ipkg install mlocate

So now you’ve got all the utlities you need so let’s download the latest version of Subliminal:

git clone -b master /tmp/subliminal

Now let’s install Subliminal.

cd /tmp/subliminal
/opt/bin/python2.7 install

You now should have a working copy of Subliminal on your NAS. Now how do you use this wonderful piece of software?

You can manually retrieve subs using this command:

# subliminal -l LANG DIR
subliminal -l en /Qmultimedia/Movies/

But here’s a better way. We’re lazy right?

Automating Subliminal with Sickbeard and Couchpotato

1) using cronjobs
Cronjobs is a command/script which runs regularly. Normally you’d use crontab for this, but QNAP automatically cleans this each reboot..
So according to their docs, we’ll have to do some other way. We’ll pick method 1.

echo "1 22,0 * * * /share/MD0_DATA/.qpkg/Optware/local/bin/subliminal -l en /Qmultimedia/Movies/" &gt;&gt; /etc/config/crontab
echo "#1 22,0 * * * /share/MD0_DATA/.qpkg/Optware/local/bin/subliminal -l en /Qmultimedia/Series/" &gt;&gt; /etc/config/crontab
crontab /etc/config/crontab

You now have a cronjob which checks for new subtitles for new movies at 22 and 24 hour each day. Don’t overdo do this, since you’re basicly scraping all the subtitle sites. Once or twice a day should do.

2) using extrascripts
Currently only sickbeard has this well documented.
Using the ‘locate’ command I found out where my SickBeard install is located.

cd /share/MD0_DATA/.qpkg/SickBeard/
vim config.ini

And find the extrascript and replace it with:

extra_scripts = ""

Now create this script:


Insert script

subliminal -l en $1

Now quit vim and chmod this bash script.

chmod +x

Congrats! Sickbeard will now automaticlly call this script as soon as an episode is downloaded meaning you will have subtitles almost directly after downloading them.

I noticed these cronjobs aren’t always running.. after quite some debugging I found a workaround. The reason the cronjobs aren’t working is because Subliminal is having problems scanning directories with lots of media. Here’s how I fixed it:

1 22,0 * * * /share/MD0_DATA/Multimedia/_crons/
10 22,0 * * * /share/MD0_DATA/Multimedia/_crons/

find /Qmultimedia/Series/ -type d | while read dir;
        /share/MD0_DATA/.qpkg/Optware/local/bin/subliminal -l en "$dir" --cache-dir /Qmultimedia/_crons/cache/
        echo "$dir"
touch /Qmultimedia/_crons/logs/series_`date +\%Y-\%m-\%d-\%H-\%M-\%S`-cron.log

find /Qmultimedia/Movies/ -type d | while read dir;
        /share/MD0_DATA/.qpkg/Optware/local/bin/subliminal -l en "$dir" --cache-dir /Qmultimedia/_crons/cache/
        echo "$dir"
touch /Qmultimedia/_crons/logs/movies_`date +\%Y-\%m-\%d-\%H-\%M-\%S`-cron.log