I worked out a different solution without PHP as mentioned above. And as mentioned, this only works for PiAware. You’ll only need to install jq
as a requirement:
sudo apt update
sudo apt install jq
Create the file pistats-fa.sh in your home directory (/home/pi):
touch pistats-fa.sh
and make it executable
chmod +x pistats-fa.sh
Open the file with
nano pistats-fa.sh
and paste the contents from pistats-fa.sh - Pastebin.com
Please check the WEBROOT variable matching the root directory of the lighttpd webserver. It is set to the default value where PiAware is run. Change to dump978-fa if neccessary (or your personal location).
Next we add the shellscript to crontab and set it to be executed every minute. Open the root user crontab with
sudo crontab -e
If you’re asked which editor you might want to use, go for nano. Next, add the following line to the end of the file:
* * * * * /home/pi/pistats-fa.sh
Save and close the file and you should see a confirmation message.
Move to /usr/share/dump1090-fa/html (or dump978-fa) and execute
sudo touch pistats.js
Open the file with
`sudo nano pistats.js’
and paste the contents from pistats.js - Pastebin.com
Important:
Please review the $( ".buttonContainer" ).prepend
line. Open up the console on your webpage by hitting F12 and perform a search for that classname. You might need to change it to a different value depending on your installation. Either .classname or #idname.
Open index.html with
sudo nano index.html
and add the following line below line 25 (use Alt-C to enable line numbers in nano):
<script type="text/javascript" src="pistats.js"></script>
That’s all. Meanwhile the pistats.json file should already be in your web server folder. Refresh your website and it should look like this (PiAware 3.8.1 on Raspian Buster):
If you hover over “Pi:” your Pi model with version number will be shown. If you hover over the throttle value, I’ve put some basic information together. I’ll do a hex-to-byte conversion maybe later and make it more fancy. Or remove it. 
Have fun!