I would like to display some statistics of my PiHole on an HTML page. I would like to display the whole thing in span's, so "< span >< /span >".
Since I'm a complete HTML noob and have no idea about the PiHole API I wanted to ask if someone can give me an HTML example code. I'm already working with the API of another service, maybe you can build it exactly like that:
I posted a guide on taking the Pi-hole Chronometer output (pihole -c) and displaying it inside a web page. That involved extracting the output into a text file, repeating this every minute by cron to keep it updated, and then using Pi-hole's own web server to display it with a refresh tag to read the updated file once a minute.
A bit hacky but it worked. It's not really what you're after but I mention it in case there's anything useful in there you can use in your application.
I think it's working because you are already logged in the web interface.
If you are not using a password for the web interface, the auth value is not needed.
The auth is needed if you have a password set and want to see the info without log in.