{"id":68065,"date":"2018-01-19T12:48:55","date_gmt":"2018-01-19T04:48:55","guid":{"rendered":"http:\/\/www.xiaoyebailong.com\/?p=68065"},"modified":"2018-01-19T13:12:45","modified_gmt":"2018-01-19T05:12:45","slug":"%e5%be%ae%e4%bf%a1%e6%94%af%e4%bb%98%e7%9a%84%e5%9d%91","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2018\/01\/19\/68065.htm","title":{"rendered":"asp\u5fae\u4fe1\u652f\u4ed8\u7684\u5751"},"content":{"rendered":"<p>\u7528\u5230\u7684\u52a0\u5bc6\u5de5\u5177\u5730\u5740<br \/>\nhttp:\/\/tool.chinaz.com\/Tools\/md5.aspx<br \/>\nmd5\u52a0\u5bc6<\/p>\n<p>https:\/\/pay.weixin.qq.com\/wiki\/doc\/api\/native.php?chapter=20_1<br \/>\n\u7b7e\u540d\u9a8c\u8bc1\u5de5\u5177<\/p>\n<p>https:\/\/pay.weixin.qq.com\/wiki\/doc\/api\/native.php?chapter=9_1<br \/>\n\u7edf\u4e00\u4e0b\u5355\u6587\u6863<\/p>\n<p>https:\/\/pay.weixin.qq.com\/wiki\/doc\/api\/native.php?chapter=6_4<br \/>\n\u626b\u7801\u63a5\u53e3\u6587\u6863\u6a21\u5f0f\u4e00<\/p>\n<p>https:\/\/pay.weixin.qq.com<br \/>\n\u5546\u6237\u5e73\u53f0\u767b\u5f55\u5730\u5740<\/p>\n<p>http:\/\/paysdk.weixin.qq.com\/<\/p>\n<p>\u5fae\u4fe1demo\u5730\u5740<\/p>\n<p>\u4e0a\u9762\u6709\u4e2a\u5730\u5740\u5f88\u5173\u952e<\/p>\n<p>http:\/\/paysdk.weixin.qq.com\/example\/qrcode.php?data=<\/p>\n<p>\u8fd8\u6709&amp;notify_url\u503c\u88ab\u8f6c\u7684\u5751\u5148\u7528tnotify_url\u66ff\u4ee3\u518d\u66ff\u6362<\/p>\n<p>asp\u66ff\u6362\u5982\u4e0b<\/p>\n<p>function notktm(stra)<br \/>\nstra=replace(stra,&#8221;tnotify_url&#8221;,&#8221;notify_url&#8221;)<br \/>\nnotktm=stra<br \/>\nend function<\/p>\n<p>\u8fd8\u6709\u5c31\u662fasp\u7684\u52a0\u5bc6\u65b9\u5f0f\u4e3aphp\u7684md5\u52a0\u5bc6\uff0c\u56e0\u4e3aasp\u6709\u4e24\u79cd\u4ee5\u4e0amd5\u52a0\u5bc6<\/p>\n<p>\u8fd8\u6709\u5982\u4e0b\u51fd\u6570\u6392\u5e8f\u95ee\u9898\u6309ascii\u7801\u5b57\u5178\u987a\u5e8f\u6392\u5e8f\uff0c\u624b\u52a8\u5c31\u53ef\u4ee5<\/p>\n<p>ASCII\u7801\u7684\u503c\u5982\u4e0b<br \/>\n48\uff5e57\u4e3a0\u52309\u5341\u4e2a\u963f\u62c9\u4f2f\u6570\u5b57\uff1b<br \/>\n65\uff5e90\u4e3a26\u4e2a\u5927\u5199\u82f1\u6587\u5b57\u6bcd\uff1b<br \/>\n97\uff5e122\u53f7\u4e3a26\u4e2a\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\u3002<br \/>\n\u6240\u4ee5\u5e94\u8be5\u5199\uff1a<br \/>\n\u6570\u5b57\u3001\u5927\u5199\u82f1\u6587\u5b57\u6bcd\u3001\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd<\/p>\n<p>\u8fd8\u6709\u767d\u540d\u5355\u7684\u95ee\u9898\uff0c\u73b0\u5df2\u52a0\u5165\u8c6a\u534e\u5957\u9910\u4e2d\uff0c\u5fc5\u987b\u628a\u6240\u5728\u7684\u865a\u62df\u7a7a\u95f4\u6216\u662fvps\uff0cecs\u4e3b\u673a\u7684IP\u52a0\u5230\u91cc\u9762\u5426\u5219\u4e5f\u51fa\u9519\uff01<\/p>\n<p>\u6700\u540e\u662fpost\u4e0eget\u63d0\u4ea4\u548cjson\u83b7\u53d6\u5206\u5272<\/p>\n<p>Function GetBody(code)<br \/>\nSet https = Server.CreateObject(&#8220;Microsoft.XMLHTTP&#8221;)<br \/>\nWith https<br \/>\n.Open &#8220;GET&#8221;, &#8220;https:\/\/api.weixin.qq.com\/sns\/oauth2\/access_token&#8221;, False<br \/>\n.setRequestHeader &#8220;Content-Type&#8221;,&#8221;application\/x-www-form-urlencoded&#8221;<br \/>\n.Send &#8220;appid=&#8221;&amp;APPID&amp;&#8221;&amp;secret=&#8221;&amp;APPSECRET&amp;&#8221;&amp;code=&#8221;&amp;code&amp;&#8221;&amp;grant_type=authorization_code&#8221;<br \/>\nGetBody = .ResponseBody<br \/>\nEnd With<br \/>\nGetBody = BytesToBstr(GetBody,&#8221;utf-8&#8243;)<br \/>\nSet https = Nothing<br \/>\nEnd Function<\/p>\n<p>Function BytesToBstr(body,Cset)<br \/>\ndim objstream<br \/>\nset objstream = Server.CreateObject(&#8220;adodb.stream&#8221;)<br \/>\nobjstream.Type = 1<br \/>\nobjstream.Mode =3<br \/>\nobjstream.Open<br \/>\nobjstream.Write body<br \/>\nobjstream.Position = 0<br \/>\nobjstream.Type = 2<br \/>\nobjstream.Charset = Cset<br \/>\nBytesToBstr = objstream.ReadText<br \/>\nobjstream.Close<br \/>\nset objstream = nothing<br \/>\nEnd Function<\/p>\n<p>Dim sc4Json<br \/>\nSub InitScriptControl<br \/>\nSet sc4Json = Server.CreateObject(&#8220;MSScriptControl.ScriptControl&#8221;)<br \/>\nsc4Json.Language = &#8220;JavaScript&#8221;<br \/>\nsc4Json.AddCode &#8220;var itemTemp=null;function getJSArray(arr, index){itemTemp=arr[index];}&#8221;<br \/>\nEnd Sub<br \/>\nFunction getJSONObject(strJSON)<br \/>\nsc4Json.AddCode &#8220;var jsonObject = &#8221; &amp; strJSON<br \/>\nSet getJSONObject = sc4Json.CodeObject.jsonObject<br \/>\nEnd Function<br \/>\nSub getJSArrayItem(objDest,objJSArray,index)<br \/>\nOn Error Resume Next<br \/>\nsc4Json.Run &#8220;getJSArray&#8221;,objJSArray, index<br \/>\nSet objDest = sc4Json.CodeObject.itemTemp<br \/>\nIf Err.number=0 Then Exit Sub<br \/>\nobjDest = sc4Json.CodeObject.itemTemp<br \/>\nEnd Sub<\/p>\n<p>Call InitScriptControl<br \/>\nSet objTest = getJSONObject(GetBody(code))<\/p>\n<p>openid=objTest.openid<br \/>\naccess_token=objTest.access_token<\/p>\n<p>\u8fd8\u6709\u65f6\u95f4\u6233<\/p>\n<p>asp\u4ee3\u7801\u5982\u4e0b<\/p>\n<p>Function ToUnixTime(strTime, intTimeZone)<br \/>\nIf IsEmpty(strTime) or Not IsDate(strTime) Then strTime = Now<br \/>\nIf IsEmpty(intTimeZone) or Not isNumeric(intTimeZone) Then intTimeZone = 0<br \/>\nToUnixTime = DateAdd(&#8220;h&#8221;,-intTimeZone,strTime)<br \/>\nToUnixTime = DateDiff(&#8220;s&#8221;,&#8221;1970-1-1 0:0:0&#8243;, ToUnixTime)<br \/>\nEnd Function<\/p>\n<p>\u7528\u6cd5times=ToUnixTime(now(),+8)<\/p>\n<p>\u8fd8\u6709<\/p>\n<p>\u968f\u673a\u5b57\u7b26\u4e32\u4ee3\u7801<\/p>\n<p>Function getCode1(iCount1)<br \/>\nDim arrChar1<br \/>\nDim j1,k1,strCode1<br \/>\narrChar1 = &#8220;23456789ABCDEFGHJKLMNPQRSTUVWXYZ&#8221;&#8216;\u53bb\u6389\u4e86\u6570\u5b571\u548c0\uff0c\u5b57\u6bcdI\u548cO<br \/>\nk1=Len(arrChar1)<br \/>\nRandomize<br \/>\nFor i1=1 to iCount1<br \/>\nj1=Int(k1 * Rnd )+1<br \/>\nstrCode1 = strCode1 &amp; Mid(arrChar1,j1,1)<br \/>\nNext<br \/>\ngetCode1 = strCode1<br \/>\nEnd Function<\/p>\n<p>\u8ba2\u5355\u53f7\u4ee3\u7801<\/p>\n<p>Randomize()<br \/>\ndingdanhao=INT((999999-1+1)*RND+1)<\/p>\n<p>notify_url\u8fd9\u4e2a\u5730\u5740\u91cc\u662f\u5f02\u6b65\u5fae\u4fe1\u7ed9\u54b1\u7a0b\u5e8f\u7684\u901a\u77e5\uff0c\u6240\u4ee5\u628a\u6210\u529f\u540e\u7684\u8c03\u7528\u51fd\u6570\u5199\u8fd9\u5730\u5740\u91cc<\/p>\n<p>\u8981\u4e0d\u7136\uff0c\u53ea\u6709\u4ed8\u6b3e\u5b8c\u6bd5\u540e\u70b9\u5b8c\u6210\u624d\u80fd\u542f\u52a8\u51fd\u6570\uff0c\u591a\u6570\u4eba\u5fd8\u8bb0\u4e86\u5462\uff1f<\/p>\n<p>\u6700\u540e\u662f\u5546\u6237ID\u53f7\u4e00\u5b9a\u8981\u548c\u5fae\u4fe1\u91cc\u7684\u5546\u6237ID\u53f7\u5bf9\u5e94\uff0c\u6211\u5c31\u9047\u89c1\u8fc7\u4e00\u6b21\u8fd9\u6837\u7684\uff01<\/p>\n<p>\u8fd8\u6709\u5c31\u662f\u626b\u7801\u652f\u4ed8\uff0c\u5fc5\u987b\u5f00\u901aH5\uff0c\u548c\u91cc\u9762\u7684\u7f51\u5740\u914d\u7f6e\u90fd\u5fc5\u987b\u586b\u5199\u597d\uff0c\u5426\u5219\u8fd8\u662f\u9519\u8bef\uff01\u817e\u8baf\u5f04\u7684\u4e0d\u5728\u4e00\u8d77\uff01\u90fd\u662f\u5751\uff0c\u6211\u90fd\u6389\u91cc\u8fc7\u3002<\/p>\n<p>\u6700\u540e\u662f\u7f16\u7801\u95ee\u9898gbk\u4e0eutf-8\u90fd\u53ef\u4ee5,gb2312\u4e0d\u884c<\/p>\n<p>Response.Codepage=&#8221;936&#8221;<br \/>\nResponse.Charset= &#8220;gbk&#8221;<\/p>\n<p>Response.Codepage=&#8221;65001&#8243;<br \/>\nResponse.Charset= &#8220;utf-8&#8243;<\/p>\n<p>\u5565\u7f16\u7801\u90fd\u6ca1\u4e0b\u9762\u8fd9\u53e5\u8bdd\u597d\u7528<\/p>\n<p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=gbk&#8221; \/&gt;<\/p>\n<p>&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=utf-8&#8243; \/&gt;<\/p>\n<p>\u4e09\u4e2a\u7f16\u7801\u540c\u65f6\u7528\u4e5f\u4f1a\u662f\u4e71\u7801<\/p>\n<p>\u548c\u5fae\u4fe1\u63a5\u53e3\u5bf9\u63a5\u7684\u65f6\u5019\u8fd8\u67092\u4e2a\u63a5\u53e3\u51fd\u6570\u4e00\u6837\uff0c\u4f46\u83b7\u53d6\u7684\u65f6\u5019\u4e0d\u4e00\u6837\uff0c\u7528\u6cd5\u4e5f\u4e0d\u4e00\u6837\uff0c\u5751\u554a<\/p>\n<p>\u83b7\u53d6access_token\u5168\u5c40\u53d8\u91cf\u7684\u51fd\u6570\u548c\u83b7\u53d6access_token\u518d\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u65f6\u7684\u4e0d\u4e00\u6837<\/p>\n<p>\u4e8c\u8005\u83b7\u53d6\u7528\u6237\u4fe1\u606f\u7684\u533a\u522b\u5728\u4e8e\u83b7\u53d6\u5173\u6ce8\u5b57\u6bb5subscribe<\/p>\n<p>access_token\u5168\u5c40\u53d8\u91cf\u4e00\u822c\u90fd\u662f\u9759\u9ed8\u4e0d\u7528\u7528\u6237\u5141\u8bb8\u83b7\u53d6\u7528\u6237openid\u548c\u4fe1\u606f\u7684<\/p>\n<p>\u901a\u8fc7\u7279\u6b8a\u7f51\u5740\u8ba9\u7528\u6237\u8fdb\u53bb\u540e\u70b9\u5141\u8bb8\u83b7\u53d6\u4fe1\u606f\u7684\u662f\u83b7\u53d6\u7528\u6237access_token\u53d8\u91cf<\/p>\n<p>\u8fd9\u6709\u70b9\u4e71\u81ea\u5df1\u6162\u6162\u4f53\u4f1a<\/p>\n<p>\u6a21\u7248\u6d88\u606f\uff08\u4e1a\u52a1\u901a\u77e5\uff09\u4e0e\u4e00\u6b21\u6027\u8ba2\u9605\u6d88\u606f\u662f\u4e0d\u4e00\u6837\u7684\uff01\u540e\u53f0\u5f88\u660e\u786e\uff0c\u90fd\u9700\u8981\u7533\u8bf7\u597d\u50cf\u3002\u4e00\u4e2a\u662f\u6587\u5b57\u4e00\u4e2a\u53ef\u4ee5\u5e26\u56fe\u7247<\/p>\n<p>\u83b7\u53d6\u7528\u6237\u5730\u7406\u4f4d\u7f6e\u4f4d\u7f6e\u8fd9\u4e2a\u529f\u80fd\uff0c\u6ca1\u9700\u6c42\u7684\u5c31\u5173\u95ed\uff0c\u592a\u70e6\u4eba\u4e86\uff01\u53ef\u4ee5\u901a\u8fc7IP\u7b49\u83b7\u53d6\u7528\u6237\u4f4d\u7f6e\uff0c\u8fd9\u4e2a\u63a5\u53e3\u8fd8\u9ebb\u70e6\u5475\u5475\uff01<\/p>\n<p>\u6700\u540e\u8bf4\u660e\u4e00\u4e0b\uff01\u53ea\u6709\u5fae\u4fe1\u7ed9\u522b\u4eba\u53d1\u94b1\u6bd4\u5982\u7ea2\u5305\u65f6\u548c\u9000\u6b3e\u65f6\u624d\u9700\u8981\u7528\u5230\u8bc1\u4e66\uff0c\u5426\u5219\u4e0d\u7528\u8bc1\u4e66\u3002<\/p>\n<p>php\u6709\u73b0\u6210\u7684demo\uff0c\u6bd4asp\u597d\u5199\u591a\u4e86\uff01\u800c\u4e14\u5751\u8fd8\u5c11\u70b9\uff0c\u5199\u7684\u4ee3\u7801\u4e5f\u7cbe\u70bc\uff0cjava\u4e0easp.net\u5c31\u6ca1\u6709php\u4ee3\u7801\u5199\u7684\u5c11\u3002<\/p>\n<p>\u5c31\u5199\u8fd9\u4e48\u591a\uff0c\u7559\u4e2a\u6587\u6863\u8ba9\u5927\u5bb6\u770b\u770b\uff0c\u6211\u5f00\u59cb\u4e5f\u662f\u56db\u5904\u627e\u4ee3\u7801,\u95ee\u522b\u4eba\uff0c\u4e00\u70b9\u70b9\u7684\u624d\u5199\u51fa\u6765\uff01<\/p>\n<p>\u4e0b\u9762\u4e0d\u662f\u6211\u7684\u7fa4\uff0c\u662fasp\u5fae\u4fe1\u5f00\u53d1\u7684\u7fa4<\/p>\n<p>\u7fa4\u53f7\uff1a3645974\u3001\u7fa4\u53f7\uff1a361633672<\/p>\n<p>\u5927\u5e08\u4eec\u90fd\u5f88\u6162\uff0c\u81ea\u5df1\u80fd\u89e3\u51b3\u7684\u95ee\u9898\u5c31\u81ea\u5df1\u89e3\u51b3\u5427\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7528\u5230\u7684\u52a0\u5bc6\u5de5\u5177\u5730\u5740 http:\/\/tool.chinaz.com\/Tools\/md5.aspx md5\u52a0\u5bc6 https:\/\/pay.weixin.qq.com\/wiki\/doc\/api\/native.php?chapter=20_1 \u7b7e\u540d\u9a8c&#8230;<\/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,102,383],"topic":[],"class_list":["post-68065","post","type-post","status-publish","format-standard","hentry","category-technology","tag-asp","tag-102","tag-383"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=68065"}],"version-history":[{"count":4,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68065\/revisions"}],"predecessor-version":[{"id":68070,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68065\/revisions\/68070"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=68065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=68065"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=68065"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=68065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}