国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? ?? ??? ?? ?? WeChat ???? ???? ?? ??

WeChat ???? ???? ?? ??

Feb 28, 2017 am 09:32 AM
?? ??

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

URL? ??: https://mp.weixin.qq.com WeChat? ??? ?, ?????. ?? WeChat ?? ??? ? ?? ??(?? ??, ??? ??, ?? ??) ??? ?????. ???? ??? ????.

WeChat ???? ???? ?? ??

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

2. ?? ??? ??? ????

?? ?? ??? ???? ?, ?? ????? ??? ???? ??, ?? WeChat ??? ??? ????? ???. ?? ??? ??? ?????? ????? ???? ??, ?? ??? URL? ??? ???. ?? WeChat ?? ???? ???????: https://mp.weixin.qq.com/

"??? ??"? ???? "???"? ??? ? "??? ??"? ??????.

WeChat ???? ???? ?? ??

?? ???? ?????.

WeChat ???? ???? ?? ??

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

1) ?????: ?????

2) ??: nonce

3) ?? ???: echostr

4) ??? ?? ? ? ????? ??? ??? ???? ??? SHA-1 ???? ?? ?? order: Signature

??? ????? ?? ?? ??? URL? get ?? ?? ????? timestamp, nonce, echostr ? ?? ? ?? ????? ?? ?? ?? ?? ???? ????. ?????, ??, ???? ????? ??? ???? ???? ????? SHA-1 ????? ?? ??? Signature2??, Signature2? ????? ?? ???? ?????. ???? echostr? ??? ?????. WeChat ??? echostr? ???? ??? ??? ????? ??????. ??? ?? ??? ??? ??? ?????.

??: Alipay? ??? ?? ??? ??? Alipay? ?? ?? ??? ??? ??? ? ? ????. ????? ???? ??? ??? ?-? ?? ? ?? ??? ?? ???? ??? ??? key1=value1+ & + key2=value2?? WeChat? ??? ???? ???? value1???. + value2 + ...?? ?? ???? ??? ?? ?? ??? ?? ?????.

?? Java ??? ??? ????.

WeChat get ??? ???? ???:

/**
 * 微信請(qǐng)求處理的核心類
 */
public class CoreServlet extends HttpServlet 
{
	private static final long serialVersionUID = 4440739483644821986L;

	/**
	 * 請(qǐng)求校驗(yàn)(確認(rèn)請(qǐng)求來(lái)自微信服務(wù)器)
	 */
	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
		// 微信服務(wù)端發(fā)來(lái)的加密簽名
		String signature = request.getParameter("signature");
		// 時(shí)間戳
		String timestamp = request.getParameter("timestamp");
		// 隨機(jī)數(shù)
		String nonce = request.getParameter("nonce");
		// 隨機(jī)字符串
		String echostr = request.getParameter("echostr");
		
		PrintWriter out = response.getWriter();
		// 請(qǐng)求校驗(yàn),若校驗(yàn)成功則原樣返回echostr,表示接入成功,否則接入失敗
		if (SignUtil.checkSignature(signature, timestamp, nonce)) {
			out.print(echostr);
		}
		out.close();
	
	}

?? ?? ?? ???:

package com.sinaapp.wx.util;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;

import com.sinaapp.wx.config.ParameterConfig;

/**
 * 請(qǐng)求校驗(yàn)工具類
 */
public class SignUtil {
	/**
	 * 校驗(yàn)簽名
	 * 
	 * @param signature 微信加密簽名
	 * @param timestamp 時(shí)間
	 * @param nonce 隨機(jī)字符串
	 * @return
	 */
	public static boolean checkSignature(String signature, String timestamp, String nonce) {
		String token = ParameterConfig.WX_TOKEN;
		String[] paramArr = new String[] { token, timestamp, nonce };
		Arrays.sort(paramArr);	// 對(duì)token、timestamp和nonce按字典排序

		// 將排序后的結(jié)果拼接成字符串
		StringBuilder sb = new StringBuilder(paramArr[0]);
		sb.append(paramArr[1]);
		sb.append(paramArr[2]);

		String cipherText = null;
		try {
			MessageDigest md = MessageDigest.getInstance("SHA-1");
			byte[] digest = md.digest(sb.toString().getBytes());	// 對(duì)接后的字符串進(jìn)行sha1加密
			cipherText = byteToStr(digest);
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		}
		
		// 將加密后的字符串與微信服務(wù)器發(fā)來(lái)的簽名signature進(jìn)行對(duì)比
		return cipherText != null ? cipherText.equals(signature.toUpperCase()) : false;
	}

	/**
	 * 將字節(jié)數(shù)組轉(zhuǎn)換為十六進(jìn)制字符
	 * 
	 * @param byteArray
	 * @return
	 */
	private static String byteToStr(byte[] byteArray) {
		String strDigest = "";
		for (int i = 0; i < byteArray.length; i++) {
			strDigest += byteToHexStr(byteArray[i]);
		}
		return strDigest;
	}

	/**
	 * 將單個(gè)字節(jié)轉(zhuǎn)換為十六進(jìn)制字符
	 * 
	 * @param mByte
	 * @return
	 */
	private static String byteToHexStr(byte mByte) {
		char[] Digit = { &#39;0&#39;, &#39;1&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39;, &#39;5&#39;, &#39;6&#39;, &#39;7&#39;, &#39;8&#39;, &#39;9&#39;, &#39;A&#39;, &#39;B&#39;, &#39;C&#39;, &#39;D&#39;, &#39;E&#39;, &#39;F&#39; };
		char[] tempArr = new char[2];
		tempArr[0] = Digit[(mByte >>> 4) & 0X0F];	// 取一個(gè)字節(jié)的高4位,然后獲得其對(duì)應(yīng)的十六進(jìn)制字符
		tempArr[1] = Digit[mByte & 0X0F];	//  取一個(gè)字節(jié)的低4位,然后獲得其對(duì)應(yīng)的十六進(jìn)制字符  

		return new String(tempArr);
		
	}
}

??? String token = ParameterConfig.WX_TOKEN ?? ?? ??? ??? ???? ???. web.xml?? ???? ?????:

  <servlet>
  	<servlet-name>coreServlet</servlet-name>
  	<servlet-class>com.sinaapp.wx.servlet.CoreServlet</servlet-class>
  </servlet>
  <servlet-mapping>
  	<servlet-name>coreServlet</servlet-name>
  	<url-pattern>/coreServlet</url-pattern>
  </servlet-mapping>

?? ?? ?? ?????? ???? ? ?? URL ??? ?? ? ???? ??? ??? ?????. URL??. ?? ?? "??" ??? ???? ??? ?? ???? ???? ?????.

WeChat ???? ???? ?? ??

? ???? WeChat? ??? ??? ????? ??? ?? ??? ??? ? ????. WeChat ??? ?????. WeChat ??? ???? AppID? AppSecret? ??????.

??:

WeChat? ?? ?? ??? ??? ????: http://mp.weixin.qq.com/wiki/home/index.html

WeChat ??? ???? ?? ??? ??? ????.

WeChat ???? ???? ?? ??

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)

???

??? ??

??? ????
1601
29
PHP ????
1502
276
???
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