Livedoor Weather Web Service
Livedoorのお天気WebサービスのRestクライアントを
Zend FrameworkのZend_Rest_Clientを使って作成
<?PHP //****************************** // Common //****************************** require_once 'Zend/Rest/Client.php'; // Zend::Rest::Client //****************************** // Client //****************************** $url = 'http://weather.livedoor.com/forecast/webservice/rest/v1' $client = new Zend_Rest_Client($url); //****************************** // parameter //****************************** $city = "70"; // 横浜 $day = "tomorrow"; $client->city($city); $client->day($day); //****************************** // resp //****************************** $result = $client->get(); //print_r($result); $telop = $result->telop; $image_url = $result->image->url;