{"id":98,"date":"2015-07-30T17:34:05","date_gmt":"2015-07-30T08:34:05","guid":{"rendered":"http:\/\/kanehiro.exe.jp\/?p=98"},"modified":"2015-07-30T21:21:59","modified_gmt":"2015-07-30T12:21:59","slug":"php%e3%81%a7dropbox%e3%81%ae%e5%85%b1%e6%9c%89%e3%83%95%e3%82%a9%e3%83%ab%e3%83%80%e3%81%ab%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e3%82%a2%e3%83%83%e3%83%97%e3%83%ad%e3%83%bc%e3%83%89%e3%81%97","status":"publish","type":"post","link":"https:\/\/kanehiro.exe.jp\/?p=98","title":{"rendered":"PHP\u3067DropBox\u306e\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30ea\u30f3\u30af\u3092\u5f35\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>LAN\u74b0\u5883\u5185\u3067\u30b5\u30fc\u30d0\u30fc\u3084NAS\u306b\u7f6e\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306f\u3001\u3088\u304f\u884c\u308f\u308c\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u305d\u308c\u306f\u3001\u305f\u3068\u3048\u3070\u3001\u4e00\u89a7\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u305fExcel\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u3001\u8a73\u7d30\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u305f\u5225\u306eExcel\u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30f3\u30af\u3059\u308b\u5f62\u3067\u5b9f\u73fe\u3055\u308c\u3066\u3044\u305f\u308a\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\/\u30b5\u30fc\u30d0\u30fc\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u3001\u95a2\u9023\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\nWeb\u30a2\u30d7\u30ea\u3060\u3068\u3001\u3069\u3046\u3067\u3057\u3087\u3046\u304b\u3002Web\u30a2\u30d7\u30ea\u304b\u3089\u30ed\u30fc\u30ab\u30eb\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u9762\u304b\u3089\u3001\u4e0d\u53ef\u306a\u3053\u3068\u3067\u3059\u3002\u3067\u3082\u3001Web\u30a2\u30d7\u30ea\u3060\u3063\u3066\u3001\u8a2d\u8a08\u30c7\u30fc\u30bf\u3084\u30d7\u30ec\u30bc\u30f3\u8cc7\u6599\u3001\u8a73\u7d30\u306a\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u305fExcel\u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30f3\u30af\u3092\u5f35\u3063\u3066\u3001\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u3068\u304d\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u305d\u3093\u306a\u3068\u304d\u3001\u601d\u3044\u4ed8\u304f\u306e\u304c\u30af\u30e9\u30a6\u30c9\u306b\u30c7\u30fc\u30bf\u3092\u7f6e\u3044\u3066\u3001\u5171\u6709\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002<br \/>\n\u3053\u3053\u3067\u306fPHP\u3067Dropbox Core API\u3092\u4f7f\u3063\u3066\u3001\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u306bExcel\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30ea\u30f3\u30af\u3092\u5f35\u308a\u3001\u5171\u6709\u30e1\u30f3\u30d0\u30fc\u3067\u7de8\u96c6\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\nExcel\u30d5\u30a1\u30a4\u30eb\u3092\u53c2\u7167\u3059\u308b\u3060\u3051\u306a\u3089\u3001Web\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308c\u3070\u3044\u3044\u3060\u3051\u306a\u306e\u3067\u3059\u304c\u3001\u5171\u540c\u7de8\u96c6\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001Dropbox\u306a\u3069\u306e\u5171\u6709\u6a5f\u80fd\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002\u4fbf\u5229\u306a\u6a5f\u80fd\u306a\u3093\u3067\u3059\u304c\u3001\u305d\u306e\u5272\u306b\u306fDropbox\u306e\u65e5\u672c\u8a9e\u5316\u3055\u308c\u305f\u60c5\u5831\u304c\u5c11\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u59cb\u3081\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u3001Dropbox\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001\u5171\u6709\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u3063\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<br \/>\n<a href=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-102\" src=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap01-300x171.png\" alt=\"cap01\" width=\"300\" height=\"171\" srcset=\"https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap01-300x171.png 300w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap01-624x357.png 624w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap01.png 676w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u3053\u3053\u3067\u306f\u3001share\u3068\u3044\u3046\u540d\u524d\u3067\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u304c\u3001\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3059\u308b\u904e\u7a0b\u3067\u5171\u6709\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u3092\u62db\u5f85\u3059\u308b\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u62db\u5f85\u3057\u305f\u3044\u4eba\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u307e\u3059\uff08\u62db\u5f85\u3059\u308b\u4eba\u306fDropbox\u30e6\u30fc\u30b6\u30fc\u3067\u306a\u304f\u3066\u306f\u306a\u308a\u307e\u305b\u3093\uff09\u3002\u5f8c\u3067\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u62db\u5f85\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001Core API\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u306b\u9032\u307f\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap02.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-103\" src=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap02-300x253.png\" alt=\"cap02\" width=\"300\" height=\"253\" srcset=\"https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap02-300x253.png 300w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap02-624x526.png 624w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap02.png 807w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nCore API\u306e\u30da\u30fc\u30b8\u3067\u3001PHP\u306eSDK\u3092Install SDK\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-104\" src=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap03-300x125.png\" alt=\"cap03\" width=\"300\" height=\"125\" srcset=\"https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap03-300x125.png 300w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap03-624x261.png 624w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap03.png 821w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306b\u3001lib\u30d5\u30a9\u30eb\u30c0\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30d5\u30a9\u30eb\u30c0\u3054\u3068PHP\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3057\u3066\u3001\u30d5\u30a9\u30eb\u30c0\u540d\u3092dropbox-sdk\u306b\u30ea\u30cd\u30fc\u30e0\u3057\u307e\u3059\u3002<br \/>\n\u305f\u3068\u3048\u3070\u3001PHP\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d5\u30a9\u30eb\u30c0\u540d\u304cCard2Dbox\u3060\u3063\u305f\u3089\u3001<br \/>\nCard2Dbox\\dropbox-sdk\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u3057\u3066\u3001php\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306fCard2Dbox\u76f4\u4e0b\u306b\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u524d\u306b\u3001Dropbox\u30a2\u30d7\u30ea\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002App Console\u306b\u79fb\u52d5\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n<a href=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-105\" src=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap04-300x207.png\" alt=\"cap04\" width=\"300\" height=\"207\" srcset=\"https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap04-300x207.png 300w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap04-624x431.png 624w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap04.png 1020w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\ncreate app\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066app\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap05.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-106\" src=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap05-300x280.png\" alt=\"cap05\" width=\"300\" height=\"280\" srcset=\"https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap05-300x280.png 300w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap05-1024x957.png 1024w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap05-624x583.png 624w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap05.png 1036w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u30e9\u30b8\u30aa\u30b0\u30eb\u30fc\u30d7\u306b\u3088\u308b\u9078\u629e\u304c\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002Dropbox API app\u306fCore API\u3092\u4f7f\u3046\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<br \/>\nMy app needs access to files already on Dropbox\u306b\u30c1\u30a7\u30c3\u30af\u3092\u4ed8\u3051\u308b\u3053\u3068\u3067\u3001\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002My app only needs access to files it creates\u306b\u30c1\u30a7\u30c3\u30af\u3092\u4ed8\u3051\u308b\u3068\u3001\u30a2\u30d7\u30ea\u5185\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u3057\u304b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044App\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u30d5\u30a1\u30a4\u30eb\u306e\u30bf\u30a4\u30d7\u3067\u306f\u3001All file types\u3092\u9078\u629e\u3057\u307e\u3059\u3002app name\u3092\u5165\u529b\u3057\u3066\u3001Create app\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u753b\u50cf\u306b\u3042\u308bfile2Dbox\u306f\u4f7f\u7528\u3055\u308c\u3066\u3044\u305f\u306e\u3067\u3001file2Dbox2\u306b\u5909\u66f4\u3057\u307e\u3057\u305f\uff09\u3002<\/p>\n<p>\u6b21\u306e\u753b\u9762\u3067\u306fOAuth2\u306e\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3(access token)\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap06.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-99\" src=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap06-300x256.png\" alt=\"cap06\" width=\"300\" height=\"256\" srcset=\"https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap06-300x256.png 300w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap06-1024x875.png 1024w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap06-624x533.png 624w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap06.png 1036w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\naccess token\u3068app name\u3092PHP\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u4f7f\u3044\u307e\u3059\u306e\u3067\u3001\u30a8\u30c7\u30a3\u30bf\u306a\u3069\u306b\u30b3\u30d4\u30da\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u6765\u305f\u3089\u3001\u3042\u3068\u306fPHP\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4f5c\u6210\u3067\u3059\u3002<br \/>\n\u307e\u305a\u3001\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3059\u308b\u305f\u3081\u306e\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308a\u307e\u3059\u3002<br \/>\n(fileform.html)<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=utf-8&quot;\/&gt;\r\n    &lt;title&gt;Dropbox file upload&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h1&gt;Dropbox file upload&lt;\/h1&gt;\r\n\r\n&lt;form action=&quot;upload.php&quot; method=&quot;POST&quot; enctype=&quot;multipart\/form-data&quot;&gt;\r\n    &lt;dl&gt;\r\n        &lt;dt&gt;&lt;label for=&quot;file&quot;&gt;&lt;\/label&gt;File&lt;\/dt&gt;\r\n        &lt;dd&gt;&lt;input type=&quot;file&quot; id=&quot;file&quot; name=&quot;file&quot;&gt;&lt;\/dd&gt;\r\n        &lt;dd&gt;&lt;input type=&quot;submit&quot; value=&quot;Upload the file to my Dropbox!&quot;&gt;&lt;\/dd&gt;\r\n    &lt;\/dl&gt;\r\n&lt;\/form&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>fileform.html\u3067\u306f\u3001submit\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u3089\u3001upload.php\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>(upload.php)<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php\r\n    require_once &quot;dropbox-sdk\/Dropbox\/autoload.php&quot;;\r\n    use \\Dropbox as dbx;\r\n    \r\n    if (isset($_FILES&#x5B;'file'])) {\r\n        $accessToken = &quot;KSk5FDq0uYYAAAAAAAAIFMvsmxe4n08W0_(\u4ee5\u964d\u7701\u7565)&quot;;\t\r\n        $clientIdentifier = &quot;file2Dbox2\/1.0&quot;;\r\n\r\n        $dbxClient = new dbx\\Client($accessToken, $clientIdentifier);\r\n        try {\r\n            print_r($_FILES&#x5B;'file']);\r\n            $f = fopen($_FILES&#x5B;'file']&#x5B;'tmp_name'], &quot;rb&quot;);\r\n            $result = $dbxClient-&gt;uploadFile(&quot;\/share\/&quot;.$_FILES&#x5B;'file']&#x5B;'name'], dbx\\WriteMode::add(), $f);\r\n            fclose($f);\r\n        } catch (Exception $e) {\r\n            $label = ($uploader &amp;&amp; $e-&gt;getCode() &amp; $uploader::FLAG_DROPBOX_GENERIC) ? 'file uploar' : 'Exception';\r\n            $error = sprintf(&quot;&#x5B;%s] #%d %s&quot;, $label, $e-&gt;getCode(), $e-&gt;getMessage());\r\n            echo '&lt;span style=&quot;color: red&quot;&gt;Error: ' . htmlspecialchars($error) . '&lt;\/span&gt;';\r\n        }\r\n        \r\n    }\r\n?&gt;\r\n<\/pre>\n<p>upload.php\u304c\u3001Dropbox\u3078\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u51e6\u7406\u3067\u3059\u3002\u307e\u305a\u3001autoload.php\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002\u6b21\u306b\u3001\u5148\u307b\u3069\u53d6\u5f97\u3057\u305f$accessToken\u3068app name\u3092\u8a18\u3057\u305f$clientIdentifier\u3092\u5f15\u6570\u306bClient\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n\u305d\u3057\u3066\u3001uploadFile\u30e1\u30bd\u30c3\u30c9\u306b\u3001\u3053\u308c\u3082\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\/share\u30d5\u30a9\u30eb\u30c0\u3092\u6307\u5b9a\u3057\u3066\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3067\u3001\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u3093\u3069\u306f\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br \/>\n(list.php)<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php\r\n    require_once &quot;dropbox-sdk\/Dropbox\/autoload.php&quot;;\r\n    use \\Dropbox as dbx;\r\n    $accessToken = &quot;KSk5FDq0uYYAAAAAAAAIFMvsmxe4n08W0_(\u4ee5\u964d\u7701\u7565)&quot;;\r\n    $clientIdentifier = &quot;file2Dbox2\/1.0&quot;;\r\n\r\n    $dbxClient = new dbx\\Client($accessToken, $clientIdentifier);\r\n    $metadata = $dbxClient-&gt;getMetadataWithChildren(&quot;\/share&quot;);\r\n\r\n    if ($metadata === null) {\r\n    } else {\r\n        $children = $metadata&#x5B;'contents'];\r\n        if ($children !== null &amp;&amp; count($children) &gt; 0) {\r\n            foreach ($children as $child) {\r\n                $download_url=$dbxClient-&gt;createShareableLink($child&#x5B;'path']);\r\n                $name = dbx\\Path::getName($child&#x5B;'path']);\r\n                echo '&lt;a href=&quot;'.$download_url.'&quot;&gt;'.$name.'&lt;\/a&gt;&lt;br&gt;';\r\n            }\r\n        }\r\n    }  \r\n<\/pre>\n<p>getMetadataWithChildren\u30e1\u30bd\u30c3\u30c9\u3067share\u30d5\u30a9\u30eb\u30c0\u306eMetadata\u3092\u914d\u5217\u3068\u3057\u3066\u53d6\u5f97\u3057\u307e\u3059\u3002\u914d\u5217\u306e\u69cb\u9020\u306f\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n<a href=\"https:\/\/www.dropbox.com\/developers\/core\/start\/php\" target=\"blank\">https:\/\/www.dropbox.com\/developers\/core\/start\/php<\/a><br \/>\n\u305d\u3057\u3066\u3001$metadata[&#8216;contents&#8217;]\u304b\u3089path\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002path\u304b\u3089\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002createShareableLink\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3068\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u306f\u306a\u304f\u3001\u958b\u304f\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002Path::getName\u30e1\u30bd\u30c3\u30c9\u306f\/\u3092\u9664\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u8fd4\u3057\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap07.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-100\" src=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap07-300x196.png\" alt=\"cap07\" width=\"300\" height=\"196\" srcset=\"https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap07-300x196.png 300w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap07-624x408.png 624w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap07.png 625w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u5b9f\u884c\u3059\u308b\u3068\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u30ea\u30f3\u30af\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001<br \/>\n<a href=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-101\" src=\"http:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap08-300x177.png\" alt=\"cap08\" width=\"300\" height=\"177\" srcset=\"https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap08-300x177.png 300w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap08-1024x606.png 1024w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap08-624x369.png 624w, https:\/\/kanehiro.exe.jp\/wp-content\/uploads\/2015\/07\/cap08.png 1028w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u30d7\u30ec\u30d3\u30e5\u30fc\u8868\u793a\u3055\u308c\u3066\u3001\u53f3\u5074\u306b\u5f53\u521d\u8868\u793a\u3055\u308c\u305f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30dc\u30bf\u30f3\u304c\u3084\u3084\u3042\u3063\u3066\u3001\u958b\u304f\u306b\u5909\u308f\u308a\u307e\u3059\u3002<br \/>\n\u958b\u304f\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001Excel\u3067\u76f4\u63a5\u3001\u7de8\u96c6\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5171\u6709\u30d5\u30a9\u30eb\u30c0\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u305f\u308a\u3001\u4f5c\u6210\u6e08\u307f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u305f\u308a\u3059\u308b\u3068\u3001\u5171\u6709\u30e1\u30f3\u30d0\u30fc\u306b\u30e1\u30fc\u30eb\u304c\u98db\u3076\u306e\u3067\u3001\u66f4\u65b0\u3055\u308c\u305f\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LAN\u74b0\u5883\u5185\u3067\u30b5\u30fc\u30d0\u30fc\u3084NAS\u306b\u7f6e\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u5171\u6709\u3059\u308b\u3053\u3068\u306f\u3001\u3088\u304f\u884c\u308f\u308c\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u305d\u308c\u306f\u3001\u305f\u3068\u3048\u3070\u3001\u4e00\u89a7\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u305fExcel\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u3001\u8a73\u7d30\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u305f\u5225\u306eExcel\u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30f3\u30af\u3059\u308b\u5f62\u3067\u5b9f\u73fe\u3055\u308c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/kanehiro.exe.jp\/index.php?rest_route=\/wp\/v2\/posts\/98"}],"collection":[{"href":"https:\/\/kanehiro.exe.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kanehiro.exe.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kanehiro.exe.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kanehiro.exe.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=98"}],"version-history":[{"count":0,"href":"https:\/\/kanehiro.exe.jp\/index.php?rest_route=\/wp\/v2\/posts\/98\/revisions"}],"wp:attachment":[{"href":"https:\/\/kanehiro.exe.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kanehiro.exe.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kanehiro.exe.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}