Pulling info from my Personal Weather Station via Wunderground
This is a simple site I created on my Omega 2+ that pulls information every 10 minutes (crontab running a script) which pulls info from my own personal weather station which is attached to weather underground. It uses a python script to pull the info based on my weather underground API key and the JSON data returned. Then, it creates a php file and writes the data into a readable format on the web server on the Omega 2+. Every 10 minutes the web page is replaced. I am sure there is possibly a better way, but for now, it is doing exactly what I want. This is just me continuing to use the information I have gotten on pulling data from JSON sources and manipulating it how I want to in different methods.
The project is assuming you have Python3 and PHP7 installed, configured and working.
It's a good project, but your use of php is useless... You can just generate a simple index.html file with your system. No need of php.
If you really want to use php you can move your logic from python to php.
These two languages are server side languages and for your example are equivalent.
Good luck !
@Joris-Mulliez I agree that PHP is of no use here, however I have plans to take this further, and wanted to start with the PHP base to work into. I am taking small steps into this whole new computing world for me. Yes, I could have just had the Python write out to "index.htm" and left it there, however what I am now doing is even beyond that. I want the initial page to allow for the selection of ZIP, City, PWS, Lat/Long and to set the refresh rate. This is only a backbone to grow from.