I have a bunch of widgets on my admin interface one of which is weather. Based on how my admin interface is coded it reloads every 60sec. Which is too many api calls per minute for weather. To change only the weather widget refresh rate is gonna take a lot, so thought it would be easier if i copy the data from the openweathermap.org every 60min and place the data in a local json that can be accessed by my weatehr widget instead of making so many api calls to the external source.
How can i use jquery, javascript or php to copy data looking like the following,from a website address to a local JSON file?
{"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"base":"cmc stations","main":{"temp":296.2,"pressure":1023,"humidity":69,"temp_min":294.82,"temp_max":297.15},"wind":{"speed":1.5},"clouds":{"all":75},"dt":1473178865,"sys":{"type":1,"id":5091,"message":0.0074,"country":"GB","sunrise":1473139361,"sunset":1473186795},"id":2643743,"name":"London","cod":200}