最終更新:2008-07-12 (土) 18:12:25 (5760d)
PHP/シリアル化
<?php // Parsing Yahoo! REST Web Service results using // unserialize. PHP4/PHP5 // Author: Jason Levitt // February 1, 2006 error_reporting(E_ALL); // output=php means that the request will return serialized PHP $request = 'http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&query=Madonna&results=4&output=php'; $response = file_get_contents($request); if ($response === false) { die('Request failed'); } $phpobj = unserialize($response); echo '<pre>'; print_r($phpobj); echo '</pre>'; ?>