{"id":278,"date":"2015-03-18T04:02:16","date_gmt":"2015-03-17T19:02:16","guid":{"rendered":"http:\/\/chaboneko.wp.xdomain.jp\/?p=278"},"modified":"2015-03-18T04:02:16","modified_gmt":"2015-03-17T19:02:16","slug":"wordpress%e3%81%aedownload-monitor%e3%81%a7dl%e3%81%97%e3%81%9f%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%8c%e7%a0%b4%e6%90%8d%e3%81%97%e3%81%9f%e5%95%8f%e9%a1%8c%e3%81%ae%e3%83%a1%e3%83%a2","status":"publish","type":"post","link":"http:\/\/chabon.cloudfree.jp\/?p=278","title":{"rendered":"WordPress\u306eDownload Monitor\u3067DL\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u7834\u640d\u3057\u305f\u554f\u984c\u306e\u30e1\u30e2"},"content":{"rendered":"<p>WordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u300cDownload Monitor\u300d\u3067\u7ba1\u7406\u3057\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u7834\u640d\u3057\u3066\u3044\u305f\u3002<br \/>\u305d\u306e\u6642\u306e\u5fd8\u5099\u9332\u7684\u306a\u30e1\u30e2<\/p>\n<p><a href=\"http:\/\/chabon.cloudfree.jp\/wp-content\/uploads\/2015\/03\/2015_0318_0214_04-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-284\" src=\"http:\/\/chabon.cloudfree.jp\/wp-content\/uploads\/2015\/03\/2015_0318_0214_04-2.jpg\" alt=\"2015_0318_0214_04\" width=\"165\" height=\"72\" \/><\/a> <br \/> \u672c\u67651MB\u3050\u3089\u3044\u3042\u308b\u306f\u305a\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u3053\u306e\u3088\u3046\u306b\u5c0f\u3055\u306a\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u306b\u306a\u3063\u3066\u3066\u958b\u304f\u3053\u3068\u3082\u3067\u304d\u306a\u3044\u3002<br \/>3.86kb\u3063\u3066\u306e\u306f\u30c7\u30a3\u30b9\u30af\u4e0a\u306e\u6700\u5c0f\u30b5\u30a4\u30ba\u306e\u5358\u4f4d\u3063\u307d\u3044<\/p>\n<p>PHP\u306e\u30a8\u30e9\u30fc\u306f\u51fa\u529b\u3055\u308c\u306a\u3044\u3057\u3001\u985e\u4f3c\u3057\u3066\u3044\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u300cWordPress Download Manager\u300d\u3084\u300cDelightful Downloads\u300d\u3067\u3082\u540c\u69d8\u306e\u75c7\u72b6\u3060\u3063\u305f\u3002<\/p>\n<!--more-->\n\n\n<p>\u65b0\u898f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3070\u304b\u308a\u306eWordPress\u3067\u3082\u540c\u69d8\u3060\u3063\u305f\u306e\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u3068\u306e\u76f8\u6027\u304c\u60aa\u3044\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u3002<br \/>\u305d\u3046\u3060\u3068\u3057\u305f\u3089\u4eca\u304a\u501f\u308a\u3057\u3066\u308b\u30b5\u30fc\u30d0\u30fc\u306f\u5171\u6709\u30b5\u30fc\u30d0\u30fc(freeweb\u7121\u6599\u7248)\u306a\u306e\u3067\u3001php.ini \u306e\u8a2d\u5b9a\u7b49\u8272\u3005\u5f04\u308c\u306a\u3044\u304b\u3089\u56f0\u3063\u305f\u3002<\/p>\n<p>\u300cDownload Monitor\u300dver1.6.4 \u306e\u30bd\u30fc\u30b9\u3092\u898b\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u305f\u3002<br \/>\u30d1\u30b9\u306f\u300c (WordPress\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\/wp-content\/plugins\/download-monitor\/includes\/ \u300d<\/p>\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u308b\u306e\u306f\u300c class-dlm-download-handler.php \u300d\u306e380\u884c\u76ee\u3042\u305f\u308a\u304b\u3089\u3063\u307d\u3044<\/p>\n<pre class=\"start-line:380 lang:php decode:true\" title=\"class-dlm-download-handler.php\">$headers = array();\n\nif ( $is_IE &amp;&amp; is_ssl() ) {\n\t\/\/ IE bug prevents download via SSL when Cache Control and Pragma no-cache headers set.\n\t$headers['Expires']       = 'Wed, 11 Jan 1984 05:00:00 GMT';\n\t$headers['Cache-Control'] = 'private';\n} else {\n\tnocache_headers();\n}\n\n$headers['X-Robots-Tag']              = 'noindex, nofollow';\n$headers['Content-Type']              = $mime_type;\n$headers['Content-Description']       = 'File Transfer';\n$headers['Content-Disposition']       = \"attachment; filename=\\\"{$file_name}\\\";\";\n$headers['Content-Transfer-Encoding'] = 'binary';\n\nif ( $version-&gt;filesize ) {\n\t$headers['Content-Length'] = $version-&gt;filesize;\n\t$headers['Accept-Ranges']  = 'bytes';\n}\n\n$headers = apply_filters( 'dlm_download_headers', $headers, $file_path, $download, $version );\n\nforeach ( $headers as $key =&gt; $value ) {\n\theader( $key . ': ' . $value );\n}<\/pre>\n<p>\u4f55\u304c\u554f\u984c\u3042\u308b\u306e\u304b\u308f\u304b\u3089\u306a\u3044\u3051\u3069\u3001\u3053\u3053\u306eHTTP\u30d8\u30c3\u30c0\u9001\u4fe1\u304c\u4e0a\u624b\u304f\u3044\u3063\u3066\u306a\u3044\u6a21\u69d8\u3002<br \/><span class=\"crayon-v\">\u300c $headers<\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-s\">&#8216;Content-Length&#8217;<\/span><span class=\"crayon-sy\">]\u3000\u300d\u306e\u3068\u3053\u308d\u3067\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u6307\u5b9a\u3067\u304d\u3066\u3044\u306a\u3044\u306e\u3060\u308d\u3046\u304b\u3002<\/span><\/p>\n<p>\u500b\u4eba\u7684\u306b\u306f\u5c0f\u3055\u3044\u30b5\u30a4\u30ba\u306ezip\u30d5\u30a1\u30a4\u30eb\u3057\u304b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u4e88\u5b9a\u306f\u306a\u3044\u3057\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u304b\u3082\u4f7f\u308f\u306a\u3044\u306e\u3067\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u304f\u308c\u308c\u3070\u305d\u308c\u3067\u3088\u304b\u3063\u305f\u3002<br \/>\u306a\u306e\u3067403\u884c\u76ee\u306e<\/p>\n<pre class=\"toolbar:2 start-line:403 lang:php decode:true\">foreach ( $headers as $key =&gt; $value ) {\n\theader( $key . ': ' . $value );\n}<\/pre>\n<p>\u3053\u308c\u3092<\/p>\n<pre class=\"toolbar:2 start-line:403 lang:php decode:true\">\/* \nforeach ( $headers as $key =&gt; $value ) {\n\theader( $key . ': ' . $value );\n}\n*\/\n\/\/ \u2193\u8ffd\u52a0\n$file_path = str_replace( ABSPATH, site_url( '\/', 'http' ), $file_path );\nheader( 'Location: ' . $file_path );\n\/\/ \u8ffd\u52a0\u7d42\u308f\u308a<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3001\u4ee3\u308f\u308a\u306bLocation\u30d8\u30c3\u30c0\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3059\u308b\u3088\u3046\u306b\u8ffd\u52a0\u3057\u305f\u3002<\/p>\n<p>\u5f37\u5f15\u306a\u65b9\u6cd5\u3060\u3051\u3069\u3001\u3068\u308a\u3042\u3048\u305a\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u6b63\u5e38\u306b\u306a\u3063\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u300cDownload Monitor\u300d\u3067\u7ba1\u7406\u3057\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u304c\u7834\u640d\u3057\u3066\u3044\u305f\u3002\u305d\u306e\u6642\u306e\u5fd8\u5099\u9332\u7684\u306a\u30e1\u30e2 \u672c\u67651MB\u3050\u3089\u3044\u3042\u308b\u306f\u305a\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u3053\u306e\u3088\u3046\u306b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12],"class_list":["post-278","post","type-post","status-publish","format-standard","hentry","category-1","tag-wordpress"],"_links":{"self":[{"href":"http:\/\/chabon.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts\/278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/chabon.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/chabon.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/chabon.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/chabon.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=278"}],"version-history":[{"count":0,"href":"http:\/\/chabon.cloudfree.jp\/index.php?rest_route=\/wp\/v2\/posts\/278\/revisions"}],"wp:attachment":[{"href":"http:\/\/chabon.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/chabon.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/chabon.cloudfree.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}