Simple PHP ACME client written by me

I gave up and now use dehydrated with dns-01 challenge. In order to get around the fact that my DNS sync’s only once every five minutes, I edited the “hooks.sh” script so that after adding the needed DNS records (via MySQL) I then loop around, sleeping 60 seconds until the Data appears with a “dig”. I can then proceed. Pro: It works. Con: Only one “dehydrate” process can run at any one time - so all others are blocked. Not a problem for now but limits me to about 288 requests a day.
Probably need to move from BIND to POWERDNS?
A PHP version of Dehydrated (with dns-01 challenge) would be useful too.