phpでOpenWeatherMapからデータを抽出したいです。
今回抽出したいデータは実行結果内の"Minami-senjumachi"です
抽出方法を教えてください。
lang
1$apiKye = "XXXXXXXXXX" 2$yubin = 116-0011 3$url = http://api.openweathermap.org/data/2.5/weather?zip=".$yubin.",jp&APPID=".$apiKye
実行するとこうなります
lang
1{"coord":{"lon":139.82,"lat":35.73},"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}], 2"base":"stations","main":{"temp":293.63,"pressure":1011,"humidity":68,"temp_min":290.93,"temp_max":296.48},"visibility":10000, 3"wind":{"speed":5.1,"deg":200},"rain":{"1h":1.02},"clouds":{"all":75}, 4"dt":1465099498,"sys":{"type":1,"id":7619,"message":0.024,"country":"JP","sunrise":1465068298,"sunset":1465120427},"id":1857140,"name":"Minami-senjumachi","cod":200}
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。