I had a need to read the temperature from my Sonoff TH20 temperature probe in my duck pond and post it on my weather website. I needed to run it as a simple cron job. Searching on the web, I found no example code written in PHP to accomplish this task and I had no desire to install Node JS and a big application just to read the temperature. So, I set out to write a PHP script to do the job. Hopefully it will serve as an example for how to access this API using PHP.
I have posted the script and instructions on my website at: https://mresoftware.com/Coolkit_API.htm This is new code that was hacked together yesterday so it may not be perfect, but it is so far running fine on my weather station web page. Anyway, I just wanted to make the example available for other old guys like me who still love PHP.