{"id":214,"date":"2008-03-18T23:40:22","date_gmt":"2008-03-18T14:40:22","guid":{"rendered":"http:\/\/ke-tai.org\/blog\/2008\/03\/18\/flashfunc\/"},"modified":"2008-03-18T23:49:06","modified_gmt":"2008-03-18T14:49:06","slug":"flashfunc","status":"publish","type":"post","link":"http:\/\/ke-tai.org\/blog\/2008\/03\/18\/flashfunc\/","title":{"rendered":"PHP\u3067\u30b1\u30fc\u30bf\u30a4\u306eFlash\u5bfe\u5fdc\u30fb\u975e\u5bfe\u5fdc\u3092\u5224\u5b9a\u3067\u304d\u308b\u95a2\u6570\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f"},"content":{"rendered":"<p>\u30b1\u30fc\u30bf\u30a4\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3088\u304f\u3042\u308b\u51e6\u7406\u306b\u3001Flash\u5bfe\u5fdc\u7aef\u672b\u3067\u3042\u308c\u3070Flash\u3092\u3001\u975e\u5bfe\u5fdc\u7aef\u672b\u3067\u3042\u308c\u3070\u753b\u50cf\u3092\u51fa\u3059\u3068\u3044\u3046\u51e6\u7406\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u307e\u3067\u306f\u3001\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306b\u30c7\u30fc\u30bf\u3092\u6301\u3063\u3066\u3001\u5bfe\u5fdc\u30fb\u975e\u5bfe\u5fdc\u3092\u5224\u5b9a\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u8a2d\u7f6e\u7b49\u304c\u9762\u5012\u3067\u3059\u3057\u3001\u52d5\u4f5c\u3082\u9045\u3044\u3067\u3059\u3002<br \/>\n\u4eca\u5f8c\u767a\u58f2\u3055\u308c\u308b\u307b\u307c\u5168\u3066\u306e\u6a5f\u7a2e\u306f\u3001Flash\u5bfe\u5fdc\u7aef\u672b\u3068\u306a\u308a\u305d\u3046\u306a\u611f\u3058\u306a\u306e\u3067\u3001\u5224\u5b9a\u51e6\u7406\u3092PHP\u3067\u95a2\u6570\u5316\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3054\u5229\u7528\u4e0a\u306e\u6ce8\u610f\u4e8b\u9805\u3067\u3059\u3002<\/p>\n<ul>\n<li>2008\u5e743\u670818\u65e5\u6642\u70b9\u3067\u306e\u7aef\u672b\u30ea\u30b9\u30c8\u3067\u30c6\u30b9\u30c8\u3057\u3066\u3044\u307e\u3059<\/li>\n<li>\u4eca\u5f8c\u306fFlash\u975e\u5bfe\u5fdc\u7aef\u672b\u304c\u51fa\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3001\u7aef\u672b\u306e\u547d\u540d\u898f\u5247\u304c\u5927\u304d\u304f\u5909\u308f\u3089\u306a\u3044\u3053\u3068\u3092\u4eee\u5b9a\u3057\u3066\u3044\u307e\u3059<\/li>\n<li>\u3082\u3057Flash\u975e\u5bfe\u5fdc\u7aef\u672b\u304c\u51fa\u305f\u308a\u3001\u547d\u540d\u898f\u5247\u3092\u5916\u308c\u305f\u7aef\u672b\u304c\u51fa\u305f\u5834\u5408\u306f\u3001\u9069\u5b9c\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<p>\u30bd\u30d5\u30c8\u30d0\u30f3\u30af\u306e\u516c\u5f0f\u30b5\u30a4\u30c8\u306bFlash\u3078\u306e\u5bfe\u5fdc\u72b6\u6cc1\u304c\u8f09\u3063\u3066\u304a\u3089\u305a\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u3001<a href=\"http:\/\/elixir.neu.co.jp\/user\/technical\/yKeitai.html\">\u3053\u3061\u3089<\/a> <small>[neu.co.jp]<\/small>\u306e\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p class=\"spacer-small\">&nbsp;<\/p>\n<pre class=\"super-pre-small\"><code>if (isEnableFlash($_SERVER['HTTP_USER_AGENT'])) {\r\n    echo 'Flash\u5bfe\u5fdc';\r\n} else {\r\n    echo 'Flash\u975e\u5bfe\u5fdc';\r\n}\r\n\r\n\/**\r\n * Flash\u5bfe\u5fdc\u5224\u5b9a\r\n *\/\r\nfunction isEnableFlash($agent)\r\n{\r\n    if (preg_match('\/^J\\\\-PHONE|MOT\\\\-\/', $agent)) {\r\n        \/\/ J-PHONE, Vodafone\u306e\u4e00\u90e8\r\n        return false;\r\n    } elseif (preg_match('\/^Vodafone\/', $agent)) {\r\n        \/\/ Vodafone\r\n        if (preg_match('\/SH|SHf|SE\\\\\/\/', $agent)) {\r\n            return true;\r\n        } else {\r\n            return false;\r\n        }\r\n    } elseif (preg_match('\/^SoftBank\/', $agent)) {\r\n        \/\/ SoftBank\r\n        if (preg_match('\/\\\\\/70[0-9]|805SC\/', $agent)) {\r\n            return false;\r\n        } else {\r\n            return true;\r\n        }\r\n    } elseif (preg_match('\/^DoCoMo\\\\\/1\\\\.0\\\\\/\/', $agent)) {\r\n        \/\/ DoCoMo mova\r\n        if (preg_match('\/[A-Z]{1,2}50[56]i\/', $agent)) {\r\n            \/\/ 505i, 506i\r\n            return true;\r\n        } else {\r\n            return false;\r\n        }\r\n    } elseif (preg_match('\/^DoCoMo\\\\\/2\\\\.0\\\\ \/', $agent)) {\r\n        \/\/ DoCoMo FOMA\r\n        if (preg_match('\/[NP]200[12]|[FN]2051|210[12]V|N2701|NM850iG|\r\nF880iES|N600i|L60[0-2]i\/', $agent)) {  \u203b\r\n            \/\/ FOMA\u306e\u4e00\u90e8\u975e\u5bfe\u5fdc\u6a5f\u7a2e\r\n            return false;\r\n        } else {\r\n            return true;\r\n        }\r\n    } elseif (preg_match('\/UP\\\\.Browser\/', $agent)) {\r\n        \/\/ au\r\n        if(preg_match('\/^KDDI\/', $agent)) {\r\n            \/\/ au\uff08HTML-OK\uff09\r\n            if (preg_match('\/KDDI\\\\-ST2[4-9]|CA2[78]|KC2[7-9]|SA29\/'\r\n, $agent)) {  \u203b\r\n                return true;\r\n            } elseif (preg_match('\/KDDI\\\\-[A-Z]{2}2[1-9]|HI3[12]|\r\nKC[3U]1\/', $agent)) {  \u203b\r\n                return false;\r\n            } else {\r\n                return true;\r\n            }\r\n        } else {\r\n            \/\/ au\uff08HDML-Only\uff09\r\n            return false;\r\n        }\r\n    } else {\r\n        \/\/ \u305d\u306e\u4ed6PC\u7b49\r\n        return true;\r\n    }\r\n}\r\n<\/code><\/pre>\n<p><small>\u203b\u8868\u793a\u306e\u95a2\u4fc2\u3067\u6298\u308a\u8fd4\u3057\u3066\u3044\u308b\u90e8\u5206\u304c\u3042\u308a\u307e\u3059\u3002\u5b9f\u969b\u306b\u306f1\u884c\u3067\u8a18\u8ff0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/small><\/p>\n<p>\u672c\u30b5\u30a4\u30c8\u306e\u30b9\u30da\u30c3\u30af\u4e00\u89a7\u30ea\u30b9\u30c8\u3092\u901a\u3057\u3066\u30c6\u30b9\u30c8\u3057\u307e\u3057\u305f\u306e\u3067\u304a\u305d\u3089\u304f\u5927\u4e08\u592b\u3060\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u3082\u3057\u9593\u9055\u3044\u7b49\u304c\u3042\u308a\u307e\u3057\u305f\u3089\u3001\u305c\u3072\u3054\u6307\u6458\u3092\u304a\u9858\u3044\u3057\u307e\u3059\u3002<\/p>\n<p class=\"spacer\">&nbsp;<\/p>\n<p><strong><em>\u95a2\u9023\uff1a<\/em><\/strong><\/p>\n<ul>\n<li><em><a href=\"http:\/\/ke-tai.org\/blog\/2007\/12\/06\/extprint\/\">PHP\u3067\u62e1\u5f35\u5b50\u3092\u51fa\u3057\u5206\u3051\u3057\u3001\u643a\u5e2f\u5168\u6a5f\u7a2e\u3067\u753b\u50cf\u3092\u8868\u793a\u3059\u308b\u65b9\u6cd5<\/a><\/em><\/li>\n<li><em><a href=\"http:\/\/ke-tai.org\/blog\/2007\/10\/22\/useragent\/\">PHP\u3067\u30ad\u30e3\u30ea\u30a2\u6bce\u306b\u632f\u308a\u5206\u3051\u3092\u884c\u3046\u306b\u306f\uff08\u30e6\u30fc\u30b6\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u7de8\uff09<\/a><\/em><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u30b1\u30fc\u30bf\u30a4\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3088\u304f\u3042\u308b\u51e6\u7406\u306b\u3001Flash\u5bfe\u5fdc\u7aef\u672b\u3067\u3042\u308c\u3070Flash\u3092\u3001\u975e\u5bfe\u5fdc\u7aef\u672b\u3067\u3042\u308c\u3070\u753b\u50cf\u3092\u51fa\u3059\u3068\u3044\u3046\u51e6\u7406\u304c\u3042\u308a\u307e\u3059\u3002 \u4eca\u307e\u3067\u306f\u3001\u5b9a\u7fa9\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306b\u30c7\u30fc\u30bf\u3092\u6301\u3063\u3066\u3001\u5bfe\u5fdc\u30fb\u975e\u5bfe\u5fdc\u3092\u5224\u5b9a\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,7],"tags":[],"_links":{"self":[{"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/posts\/214"}],"collection":[{"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":0,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/posts\/214\/revisions"}],"wp:attachment":[{"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/media?parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/categories?post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ke-tai.org\/blog\/wp-json\/wp\/v2\/tags?post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}