mIRC Home    About    Download    Register    News    Help

Print Thread
Pull information from website #265598
06/06/19 06:25 PM
06/06/19 06:25 PM
Joined: Jan 2016
Posts: 43
T
Techchef Offline OP
Ameglian cow
Techchef  Offline OP
Ameglian cow
T

Joined: Jan 2016
Posts: 43
I am totally novice when it comes to this so hopefully this can be done easily. Since weather channel screwed up the old wunderground script by making people pay (cheapest was 200 per month) to use the API service, I've been looking for another. I found apixu and it should work. I need a script that can go to http://api.apixu.com/v1/current.json?key=(API KEY)&q=(ZIP CODE) and respond with whats posted there.
(it returns this)

{"location":{"name":"New York","region":"New York","country":"USA","lat":40.75,"lon":-73.99,"tz_id":"America/New_York","localtime_epoch":1559845477,"localtime":"2019-06-06 14:24"},"current":{"last_updated_epoch":1559844905,"last_updated":"2019-06-06 14:15","temp_c":26.7,"temp_f":80.1,"is_day":1,"condition":{"text":"Partly cloudy","icon":"//cdn.apixu.com/weather/64x64/day/116.png","code":1003},"wind_mph":9.4,"wind_kph":15.1,"wind_degree":40,"wind_dir":"NE","pressure_mb":1008.0,"pressure_in":30.2,"precip_mm":0.0,"precip_in":0.0,"humidity":54,"cloud":75,"feelslike_c":27.6,"feelslike_f":81.6,"vis_km":16.0,"vis_miles":9.0,"uv":7.0,"gust_mph":9.8,"gust_kph":15.8}}

Last edited by Techchef; 06/06/19 06:25 PM.
Re: Pull information from website [Re: Techchef] #265599
06/06/19 11:02 PM
06/06/19 11:02 PM
Joined: Jan 2004
Posts: 1,271
L
Loki12583 Offline
Hoopy frood
Loki12583  Offline
Hoopy frood
L

Joined: Jan 2004
Posts: 1,271
The current beta has native support for http downloads:
https://forums.mirc.com/ubbthreads.php/topics/225704/mIRC_beta#Post225704

This script will both fetch and parse the json:
https://github.com/SReject/JSON-For-Mirc