- file_get_contents: documentation ( source)
- json_encode: documentation ( source)
- header: documentation ( source)
<?php
$url = 'http://weather.livedoor.com/forecast/webservice/json/v1?city=016010';
$json = file_get_contents( $url, true );
header( 'Content-type: application/json' );
echo json_encode( $json );