Exercice 5 : API REST

<?php
$json = file_get_contents("http://api.openweathermap.org/data/2.5/weather?q=London,uk&appid=2de143494c0b295cca9337e1e96b00e0", true); //getting the file content
$decode = json_decode($json, true); //getting the file content as array
 
foreach($decode["results"] as $k=>$v) {
	echo utf8_decode($v["text"])."<br/>";
	}
}
 
?>