{"id":652,"date":"2006-07-14T01:00:00","date_gmt":"2006-07-13T16:00:00","guid":{"rendered":"https:\/\/ecoop.net\/memo\/2006-07-14-1.html"},"modified":"2006-07-14T01:00:00","modified_gmt":"2006-07-13T16:00:00","slug":"2006-07-14-1","status":"publish","type":"post","link":"https:\/\/www.ecoop.net\/memo\/archives\/2006-07-14-1.html","title":{"rendered":"Yahoo API \u306e\u7c21\u5358\u306a\u5229\u7528\u6cd5 &#8211; serialize"},"content":{"rendered":"<p>\n<a href=\"http:\/\/developer.yahoo.co.jp\/\">http:\/\/developer.yahoo.co.jp\/<\/a> <br \/>\n\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b API \u306f\u5168\u3066 XML \u3067\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u8fd4\u308a\u307e\u3059\u304c\u3001<br \/>\noutput=php \u3092\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u8ffd\u52a0\u3059\u308b\u3068\u3001PHP \u306e serialize() \u5f62\u5f0f\u3067\u30b7\u30ea\u30a2\u30eb\u5316\u3055\u308c\u305f\u30c7\u30fc\u30bf\u304c\u8fd4\u308b\u3068\u3044\u3046\u8a18\u4e8b\u3092\u898b\u4ed8\u3051\u307e\u3057\u305f\u3002<br \/>\n&nbsp;<br \/>\n\u6ce8:\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u4ed6\u306e\u8a00\u8a9e(C#, perl \u306a\u3069)\u3067\u3082 PHP serialize \u306f\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u53ef\u80fd\u306a\u305f\u3081\u3001\u7528\u9014\u306f PHP \u306b\u9650\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306b\u4ed8\u3044\u3066\u306f\u30ea\u30f3\u30af\u5148\u306e\u6700\u5f8c\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n&nbsp;<br \/>\n<a href=\"http:\/\/developer.yahoo.com\/common\/phpserial.html\">Using Serialized PHP with Yahoo! Web Services<\/a><br \/>\n&nbsp;<br \/>\n\u3053\u3053\u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u3001<br \/>\n<a href=\"http:\/\/api.search.yahoo.com\/ImageSearchService\/V1\/imageSearch?appid=YahooDemo&amp;query=Madonna&amp;results=1&amp;output=php\">http:\/\/api.search.yahoo.com\/ImageSearchService\/V1\/imageSearch?appid=YahooDemo&amp;query=Madonna&amp;results=1&amp;output=php<\/a><br \/>\n\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u308b\u3068\u30b5\u30f3\u30d7\u30eb\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<br \/>\n&nbsp;<br \/>\n\u4ee5\u4e0b\u3001\u4e0a\u8a18 API \u3092\u5229\u7528\u3057\u305f PHP \u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u3059\u3002\n<\/p>\n<blockquote><p>&lt;?php<br \/>\n$url = &#8220;http:\/\/api.search.yahoo.com\/ImageSearchService\/V1\/&#8221; .<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;imageSearch?appid=YahooDemo&amp;query=fruit+cake&amp;results=1&amp;output=php&#8221;; <br \/>\nob_start(); <br \/>\nreadfile($url);<br \/>\n$result =unserialize(ob_get_contents()); \/\/ \u7d50\u679c\u30bb\u30c3\u30c8\u3092\u53d6\u5f97<br \/>\nob_end_clean(); <br \/>\n&nbsp;<br \/>\n\/\/ var_dump($result); \/\/ \u3069\u3046\u3044\u3046\u5185\u5bb9\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3057\u305f\u3044\u5834\u5408\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3002<br \/>\n&nbsp;<br \/>\n&nbsp;$thumbnail_url = $result[&#8220;ResultSet&#8221;][&#8220;Result&#8221;][0][&#8220;Thumbnail&#8221;][&#8220;Url&#8221;];<br \/>\n?&gt;<br \/>\n&lt;html><br \/>\n&lt;head><br \/>\n&nbsp;&nbsp;&lt;title>\u30b5\u30e0\u30cd\u30a4\u30eb&lt;\/titte><br \/>\n&lt;\/head><br \/>\n&lt;body><br \/>\n&nbsp;&nbsp;&lt;?php foreach($result[&#8220;ResultSet&#8221;][&#8220;Result&#8221;] as $record){ ?&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u25a1&lt;?=$record[&#8216;Title&#8217;]?&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&lt;?=$record[&#8216;FileSize&#8217;]?&gt; \u30d0\u30a4\u30c8)&lt;br><br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p>\u8aac\u660e:&lt;?=$record[&#8216;Summary&#8217;]?&gt;&lt;\/p><br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href=&#8221;&lt;?=$record[&#8216;ClickUrl&#8217;]?&gt;&#8221;>&lt;img src=&#8221;&lt;?=$record[&#8216;Thumbnail&#8217;][&#8216;Url&#8217;]?&gt;&#8221;>&lt;\/a>&lt;br><br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;hr><br \/>\n&nbsp;&nbsp;&lt;?php } ?&gt;<br \/>\n&lt;\/body><br \/>\n&lt;\/html>\n<\/p><\/blockquote>\n<p>&nbsp;<br \/>\n\u53c2\u8003:<br \/>\n&#8211; <a href=\"http:\/\/neta.ywcafe.net\/000544.html\">Yahoo\u66f0\u304f\u3001XML\u3058\u3083\u306a\u304f\u3066PHP\u306e\u5909\u6570\u3092\u305d\u306e\u307e\u307e\u30b7\u30ea\u30a2\u30e9\u30a4\u30ba\u3057\u3066\u8fd4\u305b\u3070\u3044\u3044\u3058\u3083\u3093<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/developer.yahoo.co.jp\/ \u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308b API \u306f\u5168\u3066 XML \u3067\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u8fd4\u308a\u307e\u3059\u304c\u3001 output=php \u3092\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u8ffd\u52a0\u3059\u308b\u3068\u3001PHP \u306e serialize() \u5f62\u5f0f\u3067 &hellip; <a href=\"https:\/\/www.ecoop.net\/memo\/archives\/2006-07-14-1.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">Yahoo API \u306e\u7c21\u5358\u306a\u5229\u7528\u6cd5 &#8211; serialize<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[11,32,18],"class_list":["post-652","post","type-post","status-publish","format-standard","hentry","tag-misc","tag-php","tag-web"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/comments?post=652"}],"version-history":[{"count":0,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/652\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/media?parent=652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/categories?post=652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/tags?post=652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}