Sorry for not poking at this for a while, Tallinn is a very nice city I would recommend it for a short trip :-P
Cool. Thanks very much for this. That should now be in the code.
Also line 23
$title = base64_encode($entry->title)
has the same problem as that is used later when the real test are used. That has been fixed also.
I have tided up the code a bit.
The settings have been moved in to a setting.json file.
Which gets created on first run.
This means that in future update you can just update from the git repo and you won't have to reset you settings.
(It also means I don't accidently commit my username and password

)
The
at solution looks good.
I am writing another php script at the moment which needs to be daemonised. So I may add this to code in the near future.