So I've just started programming. I know HTML, JS, PHP, and SQL really well. However, I don't really understand servers and actually having something run. I found this good weather API where you can send it a URL and it returns JSON data about the weather in that area. I know how to parse it and log it to a database. However, what I'm not sure about is actually logging that data and doing it automatically. In other words, what do I need to learn in order to log data (whether it be to a database or just a CSV file) about the weather every hour or so? I'm not asking for a full explanation, I just need some guidance to send me in the right direction.
Asked
Active
Viewed 75 times
1 Answers
1
A server is just a dedicated computer for supplying a service such as access to folders or hosting a site.
Depending on what you would like to do, you can set up an apache server on any pc running linux. Or you can use a hosting service such as Hostgator or Godaddy and use the mySQL tools in the cpanel to configure your own stuff and see how it runs.
http://www.everythinglinux.org/webserver/index.html
In regards to the JSON how would you be looking to present the data? On A site or on an app?

ProxyFox
- 25
- 8
-
I think I'm going to want to graph it, but I also want to store it for historical purposes – Sam McC Mar 23 '17 at 18:52
-
I believe data collected should be stored in a table in your database. I would say after creating the table in SQL dedicated to the collection of temperature, you would have to use PHP to send the data over from JSON. I believe there is an article that can help you http://stackoverflow.com/questions/19758954/get-data-from-json-file-with-php In regards to the graph, it would be a matter of setting up some code to collect data based on time and output it to a chart. Reminds me a little of this https://plot.ly/javascript/ – ProxyFox Mar 23 '17 at 19:57