{"id":55114,"date":"2020-04-09T21:45:47","date_gmt":"2020-04-09T13:45:47","guid":{"rendered":"http:\/\/4563.org\/?p=55114"},"modified":"2020-04-09T21:45:47","modified_gmt":"2020-04-09T13:45:47","slug":"%e9%80%9a%e8%bf%87%e4%bc%81%e4%b8%9a%e5%be%ae%e4%bf%a1%e5%8f%91%e9%80%81%e6%8f%90%e9%86%92%e6%b6%88%e6%81%af-%e6%94%af%e6%8c%81markdown","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=55114","title":{"rendered":"\u901a\u8fc7\u4f01\u4e1a\u5fae\u4fe1\u53d1\u9001\u63d0\u9192\u6d88\u606f \u652f\u6301markdown"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u5e08\u592a<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u901a\u8fc7\u4f01\u4e1a\u5fae\u4fe1\u53d1\u9001\u63d0\u9192\u6d88\u606f \u652f\u6301markdown<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 \u5e08\u592a \u4e8e 2020-4-9 22:05 \u7f16\u8f91 <\/p>\n<p> \u6700\u8fd1\u4e00\u76f4\u5728\u4f7f\u7528\u65b9\u7cd6\u63a8\u9001\uff0c\u770b\u5230LOC\u5927\u4f6c\u7684\u4f01\u4e1a\u5fae\u4fe1\u63a8\u9001\u611f\u89c9NB\uff0c\u96a7\u7a0d\u4f5c\u4fee\u6539\u53d1\u4e0a\u6765\u5206\u4eab\u7ed9\u5927\u5bb6\u98df\u7528~<br \/>  LOC\u5927\u4f6c\u7684GITHUB\uff1ahttps:\/\/github.com\/kaixin1995\/InformationPush<\/p>\n<p>  \u5927\u4f6c\u7684\u76ee\u524d\u4ec5\u652f\u6301\u5361\u7247\uff08\u6211\u77e5\u9053\u5927\u4f6c\u662f\u61d2\u5f97\u5199\uff09\uff0c\u7a0d\u4f5c\u4fee\u6539\u4e4b\u540e\u76ee\u524d\u652f\u6301\u6587\u5b57\u63a8\u9001\uff0c\u5361\u7247\u63a8\u9001\uff0c\u548cmarkdown\u63a8\u9001\uff08markdown\u4ec5\u652f\u6301\u5728\u4f01\u4e1a\u5fae\u4fe1\u5ba2\u6237\u7aef\u5185\u4f7f\u7528\uff0c\u666e\u901a\u5fae\u4fe1\u4ec5\u652f\u6301\u6587\u5b57\u548c\u5361\u7247\u63a8\u9001\uff09<br \/>  https:\/\/ae01.alicdn.com\/kf\/H7c43abbc92db4773ba4f93b975a4c4ddX.jpg<br \/>  https:\/\/ae01.alicdn.com\/kf\/H081cb0d8d5134dd8bce6b1b59ce7a8a7w.jpg<\/p>\n<p>  \u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n<p>  1\u3001\u521b\u5efa\u4e00\u4e2aPHP\u6587\u4ef6\uff0c\u590d\u5236\u4e0b\u65b9\u4ee3\u7801\u8fdb\u53bb\u4fdd\u5b58\uff0c\u4e0a\u4f20\u81f3\u670d\u52a1\u5668<br \/>  2\u3001\u6ce8\u518c\u4e00\u4e2a\u4f01\u4e1a\u5fae\u4fe1\uff0c\u5f88\u7b80\u5355\uff0c\u53c2\u8003\u5927\u4f6c\u6559\u7a0b https:\/\/github.com\/kaixin1995\/InformationPush<\/p>\n<p>  \u666e\u901a\u6587\u5b57\uff1ahttp:\/\/\u57df\u540d\/index.php?msg=\u6d4b\u8bd5\u63d0\u4ea4<br \/>  \u5361\u7247\u6d88\u606f\uff1ahttp:\/\/\u57df\u540d\/index.php?type=textcard&amp;msg=\u6d4b\u8bd5\u63d0\u4ea4<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; \uff08\u652f\u6301\u81ea\u5b9a\u4e49\u5361\u7247URL\u548cbtntxt\uff0chttp:\/\/\u57df\u540d\/index.php?type=textcard&amp;msg=\u6d4b\u8bd5\u63d0\u4ea4&amp;url=https:\/\/www.hostloc.com&amp;btntxt=\u66f4\u591a\uff09<br \/>  markdown\uff1ahttp:\/\/\u57df\u540d\/index.php?type=markdown&amp;msg=markdown\u5185\u5bb9\uff0c\u9700urlencode\u540e\u63d0\u4ea4<\/p>\n<p>  &lt;?php<br \/>  if(!isset($_REQUEST[&#8216;msg&#8217;])) { exit; }<\/p>\n<p>  $corpid = &#8221;; \/\/ \u586b\u5199\u4f01\u4e1aID<br \/>  $agentid = &#8221;; \/\/ \u586b\u5199\u5e94\u7528ID<br \/>  $corpsecret = &#8221;; \/\/ \u586b\u5199\u5e94\u7528Secret<\/p>\n<p>  $access_token = json_decode(icurl(&quot;https:\/\/qyapi.weixin.qq.com\/cgi-bin\/gettoken?corpid=$corpid&amp;corpsecret=$corpsecret&quot;),true)[&quot;access_token&quot;];<br \/>  $url = &quot;https:\/\/qyapi.weixin.qq.com\/cgi-bin\/message\/send?access_token=&quot;.$access_token;<\/p>\n<p>  $msg = urldecode($_REQUEST[&#8216;msg&#8217;]);<br \/>  $type = $_REQUEST[&#8216;type&#8217;];<br \/>  switch ($type) {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; \/\/ \u6587\u672c\u5361\u7247\u6d88\u606f<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; case &#8216;textcard&#8217;:<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $data = array(<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;touser&#8217; =&gt; &#8216;@all&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;toparty&#8217; =&gt; &#8216;@all&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;totag&#8217; =&gt; &#8216;@all&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;msgtype&#8217; =&gt; &#8216;textcard&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;agentid&#8217; =&gt; $agentid,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;textcard&#8217; =&gt; array(<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#8216;title&#8217; =&gt; $_REQUEST[&#8216;title&#8217;] ?? &#8216;\u65b0\u63d0\u9192&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;description&#8217; =&gt; $msg,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;url&#8217; =&gt; $_REQUEST[&#8216;url&#8217;] ?? &#8216;https:\/\/www.hostloc.com&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;btntxt&#8217; =&gt; $_REQUEST[&#8216;btntxt&#8217;] ?? &#8216;\u8be6\u60c5&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;),<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;enable_id_trans&#8217; =&gt; 0,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;enable_duplicate_check&#8217; =&gt; 0,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;duplicate_check_interval&#8217; =&gt; 1800,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; \/\/ markdown\u6d88\u606f\uff0c\u4ec5\u4f01\u4e1a\u5fae\u4fe1\u5185\u53ef\u4ee5\u67e5\u770b<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; case &#8216;markdown&#8217;:<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $data = array(<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;touser&#8217; =&gt; &#8216;@all&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;toparty&#8217; =&gt; &#8216;@all&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;totag&#8217; =&gt; &#8216;@all&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;msgtype&#8217; =&gt; &#8216;markdown&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;agentid&#8217; =&gt; $agentid,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;markdown&#8217; =&gt; array(<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#8216;content&#8217; =&gt; $msg,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;),<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;enable_duplicate_check&#8217; =&gt; 0,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;duplicate_check_interval&#8217; =&gt; 1800,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; \/\/ \u6587\u672c\u6d88\u606f<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; default:<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $data = array(<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;touser&#8217; =&gt; &#8216;@all&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;toparty&#8217; =&gt; &#8216;@all&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;totag&#8217; =&gt; &#8216;@all&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;msgtype&#8217; =&gt; &#8216;text&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;agentid&#8217; =&gt; $agentid,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;text&#8217; =&gt; array(<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&#8216;content&#8217; =&gt; $msg,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;), <br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;safe&#8217; =&gt; 0,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;enable_id_trans&#8217; =&gt; 0,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;enable_duplicate_check&#8217; =&gt; 0,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&#8216;duplicate_check_interval&#8217; =&gt; 1800,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br \/>  }<\/p>\n<p>  $res = json_decode(icurl($url,json_encode($data)));<\/p>\n<p>  if ( $res-&gt;errcode == 0 ) { echo &quot;Success&quot;; } else { echo &quot;Error\uff1a&quot;.$res-&gt;errmsg; }<\/p>\n<p>  function icurl($url, $data = null)<br \/>  {<br \/>  &nbsp; &nbsp; $curl = curl_init();<br \/>  &nbsp; &nbsp; curl_setopt($curl, CURLOPT_URL, $url);<br \/>  &nbsp; &nbsp; curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);<br \/>  &nbsp; &nbsp; curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);<br \/>  &nbsp; &nbsp; if (!empty($data)) {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;curl_setopt($curl, CURLOPT_POST, 1);<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;curl_setopt($curl, CURLOPT_POSTFIELDS, $data);<br \/>  &nbsp; &nbsp; }<br \/>  &nbsp; &nbsp; curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);<br \/>  &nbsp; &nbsp; $res = curl_exec($curl);<br \/>  &nbsp; &nbsp; curl_close($curl);<br \/>  &nbsp; &nbsp; return $res;<br \/>  }\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cherbim<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 cherbim \u4e8e 2020-4-9 22:13 \u7f16\u8f91 <\/p>\n<p> \u4e0d\u5982\u770b\u770b\u6211\u7684&#8230;..<br \/>  https:\/\/image.tiwo.cc\/imgs\/2020\/04\/31d902f9e2e6f44d.jpg\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5927\u4fa0\u9976\u547d<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e00\u4e2a\u8bba\u575b\u90fd\u80fd\u73a9\u51fa\u82b1\u6765\u7684\u90fd\u662f\u5927\u4f6c\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>sdcool<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5389\u5bb3\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5e08\u592a<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tcherbim \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-4-9 22:07<br \/>  \u4e0d\u5982\u770b\u770b\u6211\u7684&#8230;..<\/p>\n<p> \u53ef\u4ee5\u642d\u914dLOC\u5e16\u5b50\u76d1\u63a7\u7136\u540e\u5b9e\u65f6\u63a8\u9001\u5230\u5fae\u4fe1\u7684\u554a\u54c8\u54c8\u54c8\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>b66667777<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u611f\u8c22\u5206\u4eab\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>ljm4216<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u652f\u6301\u5927\u4f6c\u54e6\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5e08\u592a \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u901a\u8fc7\u4f01\u4e1a\u5fae\u4fe1&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/55114"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55114"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/55114\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55114"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}