亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

? ?? ??? ?? ?? ASP.NET WeChat ?? ????? ??? ?? ??

ASP.NET WeChat ?? ????? ??? ?? ??

Mar 10, 2017 pm 02:34 PM
asp.net ?? ??

? ???? ASP.NET WeChat ?? ????? ???? ??? ?????. WeChat ?? ???? ??? ??? ?????. ?? ?? ???? ??? ? ????.

?? ??? ???? ??? ??? ? WeChat ??? ?????. GET ??? ??? URL? ???? ?? 4?? ????? ?????.

ASP.NET WeChat ?? ????? ??? ?? ??

???? ??? ???? ??? ?????(?? ?? ??? ??). ?? GET ??? WeChat ???? ?? ??? ???? echostr ???? ??? ??? ??? ??? ??? ????, ??? ??? ??? ?????.

??? ???? ??? ?? ????? ??? ????? ???? ? nonce ????? ?????.

???/?? ??:

  • 1. ? ?? ???? ??, ?????, nonce? ????? ?????.

  • 2. sha1 ???? ?? ? ?? ???? ???? ??? ???? ?????

  • 3. ???? ???? ???? ??? ??? ? ????.

/// <summary> 
 /// 驗(yàn)證簽名 
 /// </summary> 
 /// <param name="signature"></param> 
 /// <param name="timestamp"></param> 
 /// <param name="nonce"></param> 
 /// <returns></returns> 
 public static bool CheckSignature(String signature, String timestamp, String nonce) 
 { 
 String[] arr = new String[] { token, timestamp, nonce }; 
 // 將token、timestamp、nonce三個(gè)參數(shù)進(jìn)行字典序排序 
 Array.Sort<String>(arr); 
 
 StringBuilder content = new StringBuilder(); 
 for (int i = 0; i < arr.Length; i++) 
 { 
  content.Append(arr[i]); 
 } 
 
 String tmpStr = SHA1_Encrypt(content.ToString()); 
 
 
 // 將sha1加密后的字符串可與signature對(duì)比,標(biāo)識(shí)該請(qǐng)求來(lái)源于微信 
 return tmpStr != null ? tmpStr.Equals(signature) : false; 
 } 
 
 
 /// <summary> 
 /// 使用缺省密鑰給字符串加密 
 /// </summary> 
 /// <param name="Source_String"></param> 
 /// <returns></returns> 
 public static string SHA1_Encrypt(string Source_String) 
 { 
 byte[] StrRes = Encoding.Default.GetBytes(Source_String); 
 HashAlgorithm iSHA = new SHA1CryptoServiceProvider(); 
 StrRes = iSHA.ComputeHash(StrRes); 
 StringBuilder EnText = new StringBuilder(); 
 foreach (byte iByte in StrRes) 
 { 
  EnText.AppendFormat("{0:x2}", iByte); 
 } 
 return EnText.ToString(); 
 }


?? ? ?? WeChat ????? ??? ??? ?????. ?? ??? ???? ??? WeChat ??? ??? URL? ???? ?????.

 protected void Page_Load(object sender, EventArgs e) 
 { 
 
 if (Request.HttpMethod.ToUpper() == "GET") 
 { 
  // 微信加密簽名 
  string signature = Request.QueryString["signature"]; 
  // 時(shí)間戳 
  string timestamp = Request.QueryString["timestamp"]; 
  // 隨機(jī)數(shù) 
  string nonce = Request.QueryString["nonce"]; 
  // 隨機(jī)字符串 
  string echostr = Request.QueryString["echostr"]; 
  if (WeixinServer.CheckSignature(signature, timestamp, nonce)) 
  { 
  Response.Write(echostr); 
  } 
 
 } 
 else if (Request.HttpMethod.ToUpper() == "POST") 
 { 
 
  StreamReader stream = new StreamReader(Request.InputStream); 
  string xml = stream.ReadToEnd(); 
 
  processRequest(xml); 
 } 
 
 
 } 
 
 
 /// <summary> 
 /// 處理微信發(fā)來(lái)的請(qǐng)求 
 /// </summary> 
 /// <param name="xml"></param> 
 public void processRequest(String xml) 
 { 
 try 
 { 
 
  // xml請(qǐng)求解析 
  Hashtable requestHT = WeixinServer.ParseXml(xml); 
 
  // 發(fā)送方帳號(hào)(open_id) 
  string fromUserName = (string)requestHT["FromUserName"]; 
  // 公眾帳號(hào) 
  string toUserName = (string)requestHT["ToUserName"]; 
  // 消息類型 
  string msgType = (string)requestHT["MsgType"]; 
 
  //文字消息 
  if (msgType == ReqMsgType.Text) 
  { 
  // Response.Write(str); 
 
  string content = (string)requestHT["Content"]; 
  if(content=="1") 
  { 
   // Response.Write(str); 
   Response.Write(GetNewsMessage(toUserName, fromUserName)); 
   return; 
  } 
  if (content == "2") 
  { 
   Response.Write(GetUserBlogMessage(toUserName, fromUserName)); 
   return; 
  } 
  if (content == "3") 
  { 
   Response.Write(GetGroupMessage(toUserName, fromUserName)); 
   return; 
  } 
  if (content == "4") 
  { 
   Response.Write(GetWinePartyMessage(toUserName, fromUserName)); 
   return; 
  } 
  Response.Write(GetMainMenuMessage(toUserName, fromUserName, "你好,我是vinehoo,")); 
 
  } 
  else if (msgType == ReqMsgType.Event) 
  { 
  // 事件類型 
  String eventType = (string)requestHT["Event"]; 
  // 訂閱 
  if (eventType==ReqEventType.Subscribe) 
  { 
   
   Response.Write(GetMainMenuMessage(toUserName, fromUserName, "謝謝您的關(guān)注!,")); 
   
  } 
  // 取消訂閱 
  else if (eventType==ReqEventType.Unsubscribe) 
  { 
   // TODO 取消訂閱后用戶再收不到公眾號(hào)發(fā)送的消息,因此不需要回復(fù)消息 
  } 
  // 自定義菜單點(diǎn)擊事件 
  else if (eventType==ReqEventType.CLICK) 
  { 
   // TODO 自定義菜單權(quán)沒有開放,暫不處理該類消息 
  } 
  } 
  else if (msgType == ReqMsgType.Location) 
  { 
  } 
 
 
 } 
 catch (Exception e) 
 { 
  
 } 
 }<pre name="code" class="csharp"> protected void Page_Load(object sender, EventArgs e) 
 { 
 
 if (Request.HttpMethod.ToUpper() == "GET") 
 { 
  // 微信加密簽名 
  string signature = Request.QueryString["signature"]; 
  // 時(shí)間戳 
  string timestamp = Request.QueryString["timestamp"]; 
  // 隨機(jī)數(shù) 
  string nonce = Request.QueryString["nonce"]; 
  // 隨機(jī)字符串 
  string echostr = Request.QueryString["echostr"]; 
  if (WeixinServer.CheckSignature(signature, timestamp, nonce)) 
  { 
  Response.Write(echostr); 
  } 
 
 } 
 else if (Request.HttpMethod.ToUpper() == "POST") 
 { 
 
  StreamReader stream = new StreamReader(Request.InputStream); 
  string xml = stream.ReadToEnd(); 
 
  processRequest(xml); 
 } 
 
 
 } 
 
 
 /// <summary> 
 /// 處理微信發(fā)來(lái)的請(qǐng)求 
 /// </summary> 
 /// <param name="xml"></param> 
 public void processRequest(String xml) 
 { 
 try 
 { 
 
  // xml請(qǐng)求解析 
  Hashtable requestHT = WeixinServer.ParseXml(xml); 
 
  // 發(fā)送方帳號(hào)(open_id) 
  string fromUserName = (string)requestHT["FromUserName"]; 
  // 公眾帳號(hào) 
  string toUserName = (string)requestHT["ToUserName"]; 
  // 消息類型 
  string msgType = (string)requestHT["MsgType"]; 
 
  //文字消息 
  if (msgType == ReqMsgType.Text) 
  { 
  // Response.Write(str); 
 
  string content = (string)requestHT["Content"]; 
  if(content=="1") 
  { 
   // Response.Write(str); 
   Response.Write(GetNewsMessage(toUserName, fromUserName)); 
   return; 
  } 
  if (content == "2") 
  { 
   Response.Write(GetUserBlogMessage(toUserName, fromUserName)); 
   return; 
  } 
  if (content == "3") 
  { 
   Response.Write(GetGroupMessage(toUserName, fromUserName)); 
   return; 
  } 
  if (content == "4") 
  { 
   Response.Write(GetWinePartyMessage(toUserName, fromUserName)); 
   return; 
  } 
  Response.Write(GetMainMenuMessage(toUserName, fromUserName, "你好,我是vinehoo,")); 
 
  } 
  else if (msgType == ReqMsgType.Event) 
  { 
  // 事件類型 
  String eventType = (string)requestHT["Event"]; 
  // 訂閱 
  if (eventType==ReqEventType.Subscribe) 
  { 
   
   Response.Write(GetMainMenuMessage(toUserName, fromUserName, "謝謝您的關(guān)注!,")); 
   
  } 
  // 取消訂閱 
  else if (eventType==ReqEventType.Unsubscribe) 
  { 
   // TODO 取消訂閱后用戶再收不到公眾號(hào)發(fā)送的消息,因此不需要回復(fù)消息 
  } 
  // 自定義菜單點(diǎn)擊事件 
  else if (eventType==ReqEventType.CLICK) 
  { 
   // TODO 自定義菜單權(quán)沒有開放,暫不處理該類消息 
  } 
  } 
  else if (msgType == ReqMsgType.Location) 
  { 
  } 
 
 
 } 
 catch (Exception e) 
 { 
  
 } 
 }

 


? ??? ASP.NET WeChat ?? ????? ???? ?? ??? ??? ????? ?? ??? ??? ??? ??? ????. .

? ??? ASP.NET WeChat ?? ????? ??? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1597
29
PHP ????
1488
72
???
PHP WeChat ??: ??? ??? ? ?? ?? ?? ?? PHP WeChat ??: ??? ??? ? ?? ?? ?? ?? May 13, 2023 am 11:40 AM

PHP? ? ?? ? ?? ? ?????, ?? WeChat ??? ?? ???? ?? ?? ???? ?????. ??? ?? ? ?? ??? ???? WeChat ??? PHP? ???? ???? ????. PHP? ??? ?? ???? ?? ?? ???? ?????. WeChat ???? ??? ??? ? ???? ??? ??? ???? ?? ??? ?? ??? ?????. ??? ? ??? ??? ?? ???? ?? ??? ?? ???? ??? ? ?? ????? ??? ? ? ????.

PHP WeChat ??: ?? ?? ?? ?? PHP WeChat ??: ?? ?? ?? ?? May 14, 2023 am 11:21 AM

WeChat ?? ??? ??? ? ?? ??? ?? ?????. ?? ??? ????? ?? ??? ??? ??? ? ?? ?? ????, ??? ?? ? ?? ??? ?? ??? ????? ???. ? ????? PHP? ???? WeChat ?? ??? ???? ??? ?????. WeChat ?? ?? ??? ???? ?? WeChat ?? ?? ??? ??? ???. WeChat ?? ?????? WeChat ?? ??, ?? ?? ? ?? ??? ???? ??? API ??? ???? ???. PHP ??? ???? ???? ???? WeChat?? ????? ???? PH? ???? ???.

PHP? ???? WeChat ?? ??? ?? ?? PHP? ???? WeChat ?? ??? ?? ?? May 13, 2023 pm 05:00 PM

WeChat? ??? ?? ?? ? ?? ??? WeChat? ??? ??? ???? ??????. WeChat ?? ??? ??? ??? WeChat ???? ???? ??? ?? ? ?????. ??? ?? ???? ????? ??? ?????? ?? ??? ?? ??? ?? ?????. ??? WeChat ?? ??? ??? ???? ?? ?? ?????. ? ????? PHP? ???? WeChat ?? ??? ??? ???? ??? ?????. 1. ?? ?? WeChat ?? ??? ??? ????? ?? ?? ??? ???? ???. PHP WeChat ?? ??? ??? ?? ?? ?? ?? ??: Sub

PHP WeChat ??: ?? ??? ?? ? ?? ?? ?? PHP WeChat ??: ?? ??? ?? ? ?? ?? ?? May 13, 2023 pm 05:51 PM

WeChat? ?? ???? ?? ? ??? ??? ??? ?? ??? ? ?????. ??? ???? ??? ?? ?? ? ?? ???? WeChat ???? ???? ??? ??????. WeChat ???? ??? ? ?? ???? ??? ?????. ?? ??? ?? ?? ? ? ???? ?? WeChat ??? PHP ??? ??? ? ????. 1. PHP ?? WeChat ?? PHP? ? ?? ???? ?? ???? ?? ?? ?? ? ???? ?????. WeChat ?? ????? ???? ?? ?????? ???? PHP ??? ???? WeChat? ??? ? ????.

PHP WeChat ??: ??? ?? ?? ?? ?? PHP WeChat ??: ??? ?? ?? ?? ?? May 13, 2023 pm 04:31 PM

WeChat ?? ?? ???? ??? ?? ??? ???? ???? ? ? ???? ??? ? ??? ?? ?? ??? ?????. ? ????? PHP? ???? WeChat ??? ?? ?? ??? ???? ??? ?????. 1. WeChat ???? openid? ?????. WeChat ??? ?? ?? ??? ???? ?? ?? ???? openid? ???? ???. WeChat ?? ??? ??? ? ??? ??? ?? openid? ?? ?? ???? ?????. ??? ??? ???? ?? ??? ?? ???? ?? ? ????.

PHP WeChat ??: ?? ??? ?? ??? ???? ?? PHP WeChat ??: ?? ??? ?? ??? ???? ?? May 13, 2023 pm 04:31 PM

WeChat? ???? ??? ?? ? ??? ?????? ??? ???, WeChat? ??? ??? ??? ?? ??? ??? ??? ??? ?? ????. ??? ?? WeChat? ??? ????? ???? ?? ??? ??? ???? WeChat ??? ???? ?? ?? ???? ????. ? ? ?? ?? ??? ?? ?? ?????. ???? PHP ??????? ?? ??? ?? ??? ??? ???? ???? ??? ??? ?????. 1. WeChat ?? ??? ??? ?? ??? ?????. ?? ??? ?? ??? ???? ??? ?????.

PHP? ???? WeChat ?? ?? ??? ???? ?? PHP? ???? WeChat ?? ?? ??? ???? ?? Jun 27, 2023 pm 12:26 PM

PHP? ???? WeChat ?? ??? ???? ?? WeChat ?? ??? ?? ??? ?? ? ?? ??? ?? ??? ??? ????, ????? ???? ? ??? PHP? ???? WeChat ?? ??? ??? ?? ????. ? ????? PHP? ???? WeChat ?? ??? ???? ???? ??? ?????. 1??: WeChat ?? ??? ??? ??? ????. WeChat ?? ?? ??? ???? ?? WeChat ?? ??? ??? ??? ???? ???. ???? ?? ??? WeChat ?? ??? ?? ????? ?????.

WeChat ??? PHP? ???? ??? ?????? WeChat ??? PHP? ???? ??? ?????? May 21, 2023 am 08:37 AM

???? ??? ??? ??? ???? WeChat? ?? ? ??? ???? ???? ?? ??? ?????. ?? ? ?????? ??? WeChat ??? PHP? ???? ??? ?? ???? ??? ?????. ? ????? ?? WeChat ??? PHP? ???? ??? ?? ?? ?? ???? ?? ? ? ?? ??? ?????. 1. ?? ?? ?? WeChat? ???? ?? ?? ?? ?? ??? ???? ???. ??, PHP ?? ??? WeChat ?? ???? ???? ???.

See all articles