{"id":533,"date":"2012-09-02T10:36:27","date_gmt":"2012-09-02T01:36:27","guid":{"rendered":"http:\/\/www.tokyostyling.com\/pc\/?p=533"},"modified":"2012-09-03T06:42:10","modified_gmt":"2012-09-02T21:42:10","slug":"qdmail_receiver-php%e3%81%8b%e3%82%89%e3%83%a1%e3%83%bc%e3%83%ab%e7%99%ba%e4%bf%a1%e6%99%82%e5%88%bb%e6%83%85%e5%a0%b1%e3%82%92%e5%8f%96%e5%be%97%e3%81%a7%e3%81%8d%e3%82%8b%e3%82%88%e3%81%86%e3%81%ab","status":"publish","type":"post","link":"http:\/\/www.tokyostyling.com\/pc\/archives\/533","title":{"rendered":"qdmail_receiver.php\u304b\u3089\u30e1\u30fc\u30eb\u767a\u4fe1\u6642\u523b\u60c5\u5831\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u4fee\u6b63\uff01 \u30d7\u30ed\u30b8\u30a7\u30af\u30c8J"},"content":{"rendered":"<p>PHP\u306e\u30e1\u30fc\u30eb\u53d7\u4fe1\u306bqdmail_receiver.php\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059<br \/>\n\u4fbf\u5229\u3067\u3059<br \/>\n\u4f5c\u8005\u306b\u306f\u611f\u8b1d\u3057\u3066\u304a\u308a\u307e\u3059<\/p>\n<p>\u3067\u3001\u4eca\u56de\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5fc5\u8981\u306a\u60c5\u5831\u306b\u30e1\u30fc\u30eb\u767a\u4fe1\u6642\u523b\u304c\u3042\u308a\u307e\u3059<br \/>\n\u6b8b\u5ff5\u306a\u304c\u3089\u3001qdmail_receiver.php\u306b\u306f\u3042\u308a\u307e\u305b\u3093<br \/>\n\u3046\uff5e\u3093<br \/>\n\u306a\u3044\u306a\u3089\u3001\u8ffd\u52a0\u3057\u3066\u307f\u307e\u3057\u3087\u3046<\/p>\n<p>\u3053\u3061\u3089\u3068\u306a\u308a\u307e\u3059<br \/>\nqdmail_receiver.php\u306edecodeHeader()\u306b\u8ffd\u52a0\u3057\u307e\u3057\u305f<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\tfunction decodeHeader(){\r\n\t\tstatic $addr = array(\r\n\t\t\t'to',\r\n\t\t\t'cc',\r\n\t\t\t'bcc',\r\n\t\t\t'reply-to',\r\n\t\t\t'from',\r\n\t\t);\r\n\r\n\t\tif(\t!$this -&gt; already_getMail ){\r\n\t\t\t$this-&gt;getMail();\r\n\t\t}\r\n\r\n\t\t\/\/ cutting\r\n\t\tif( 0 === preg_match( '\/\\r?\\n\\r?\\n\/is', trim( $this-&gt;all ), $matches, PREG_OFFSET_CAPTURE)){\r\n\t\t\t$this-&gt;header_all = $this-&gt;all ;\r\n\t\t\t$this-&gt;body_all   = null;\r\n\t\t}else{\r\n\t\t\t$offset = $matches&#x5B;0]&#x5B;1] ;\r\n\t\t\t$this-&gt;header_all = trim( substr( $this-&gt;all , 0 , $offset ) ) ;\r\n\t\t\t$this-&gt;body_all   = trim( substr( $this-&gt;all , $offset + 1 ) ) ;\r\n\t\t}\r\n\t\t$this-&gt;header = $this-&gt;buildHeader( $this-&gt;header_all );\r\n\t\t\/\/ address field action , force to array type\r\n\t\tforeach( $addr as $ad ){\r\n\t\t\tif( !isset( $this-&gt;header&#x5B;$ad]) ){ continue; }\r\n\t\t\tif(is_array($this-&gt;header&#x5B;$ad])){\r\n\t\t\t\t$addr_header = array_shift( $this-&gt;header&#x5B;$ad] );\r\n\t\t\t}else{\r\n\t\t\t\t$addr_header = $this-&gt;header&#x5B;$ad];\r\n\t\t\t}\r\n\t\t\t$person = explode( ',' , $addr_header );\r\n\t\t\t$this-&gt;header&#x5B;$ad] = array();\r\n\t\t\tforeach($person as $pers){\r\n\t\t\t\tif( !empty( $pers ) ){\r\n\t\t\t\t\t$this-&gt;header&#x5B;$ad]&#x5B;] = $this-&gt;splitMime( $pers , true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\/\/ subject\r\n\t\tif( isset( $this-&gt;header&#x5B;'subject'] ) ){\r\n\t\t\t$this-&gt;header&#x5B;'subject']= $this-&gt;splitMime( $this-&gt;header&#x5B;'subject'] , false );\r\n\t\t}\r\n\r\n\t\t\/\/ date masekatsu\r\n\t\tif( isset( $this-&gt;header&#x5B;'date'] ) ){\r\n\t\t\t$this-&gt;header&#x5B;'date']= $this-&gt;splitMime( $this-&gt;header&#x5B;'date'] , false );\r\n\t\t}\r\n\r\n\t\t$this-&gt;already_header = true;\r\n\t}\r\n<\/pre>\n<p>\u3067\u3001\u3053\u308c\u3067\u3001qdmail_receiver.php\u306f\u5b8c\u4e86<\/p>\n<p>\u3042\u3068\u306f\u3001\u547c\u3073\u51fa\u3057\u5074\u3092\u3053\u308c\u306b\u3042\u308f\u305b\u3066\u4fee\u6b63\u3067\u3059<br \/>\n\u3068\u3044\u3063\u3066\u3082\u7c21\u5358\u306a\u3082\u306e<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\t $tmp .= &quot;\u3010&quot;.date(&quot;Y\/m\/d H:i:s&quot;,strtotime($recv-&gt;header(array('date','name'),'none'))).&quot;\u3011&quot;;\r\n\r\n<\/pre>\n<p>$recv->header(array(&#8216;date&#8217;,&#8217;name&#8217;))\u3067\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066\u3001strtotime\u3001date\u3067\u65e5\u4ed8\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u6574\u5f62\u3057\u3066\u5b8c\u6210\u3067\u3059<\/p>\n<p>\u3042\uff5e\u3001\u7c21\u5358\u3067\u3057\u305f<br \/>\n\u3061\u3083\u304f\u3061\u3083\u304f\u3068\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8J\u306f\u9032\u307f\u307e\u3059<\/p>\n<p>\u3010\u30b5\u30a4\u30c8\u60c5\u5831\u3011<br \/>\n<a href=\"http:\/\/hal456.net\/qdmail_rec\/\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" align=\"left\" border=\"0\" src=\"http:\/\/capture.heartrails.com\/150x130\/shadow?http:\/\/hal456.net\/qdmail_rec\/\" alt=\"\" width=\"150\" height=\"130\" \/><\/a><a style=\"color:#0070C5;\" href=\"http:\/\/hal456.net\/qdmail_rec\/\" target=\"_blank\">QdmailReceiver\u3068\u306f &#8211; QdmailReceiver Multibyte mail decoder &#038; POP Client<\/a><a href=\"http:\/\/b.hatena.ne.jp\/entry\/http:\/\/hal456.net\/qdmail_rec\/\" target=\"_blank\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/b.hatena.ne.jp\/entry\/image\/http:\/\/hal456.net\/qdmail_rec\/\" alt=\"\" \/><\/a><br style=\"clear:both;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP\u306e\u30e1\u30fc\u30eb\u53d7\u4fe1\u306bqdmail_receiver.php\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059 \u4fbf\u5229\u3067\u3059 \u4f5c\u8005\u306b\u306f\u611f\u8b1d\u3057\u3066\u304a\u308a\u307e\u3059 \u3067\u3001\u4eca\u56de\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5fc5\u8981\u306a\u60c5\u5831\u306b\u30e1\u30fc\u30eb\u767a\u4fe1\u6642\u523b\u304c\u3042\u308a\u307e\u3059 \u6b8b\u5ff5\u306a\u304c\u3089\u3001qdmail_receiver.p [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[9],"tags":[],"class_list":["post-533","post","type-post","status-publish","format-standard","hentry","category-j"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TwBu-8B","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/posts\/533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/comments?post=533"}],"version-history":[{"count":3,"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/posts\/533\/revisions"}],"predecessor-version":[{"id":536,"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/posts\/533\/revisions\/536"}],"wp:attachment":[{"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/media?parent=533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/categories?post=533"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tokyostyling.com\/pc\/wp-json\/wp\/v2\/tags?post=533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}