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

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

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

Jul 16, 2019 pm 02:21 PM
?? ?? ?? ??

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

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

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

(? ?? ?? ??? ??? ???? ????. ? ?? ??? PHP ? ?? ??? ?????)

//自定義請求接口函數(shù),$data為空時(shí)發(fā)起get請求,$data有值時(shí)發(fā)情post請求
function http_url($url,$data=null){
    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
    curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
    if(!empty($data)){
        curl_setopt($ch,CURLOPT_POST,1);
        curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
    }
    $res = curl_exec($ch);
    if(curl_errno($ch)){
        echo "error:".curl_error($ch);
        exit;
    }
    curl_close($ch);
    return $res;
}

(?? ???? ????? ? ??? Tencent?? ????? ??? ????. WeChat ?? ???? ??? ??)

? ?????. 1. ?? ?? ??? ???? ???

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

?? - ????? ?? - ? ??? - ? ?? - ?? ??? ??? ?? ?? ? ??" ?? ???? ???? ???. ?? ?? ??? ??? ?????. ???? URL? ?? ??? ??(???)? ????? http://? ?? ???? ??? ???? ???.

2 ?? ?? ??? ?? ?? ??? ??? ????. ?? ??? ??(?: ???? ??? ???) ??? ??? www.qq.com???. ?? ? ? ??? ?? ??? ???? http://www.qq.com/music.html ? http://???. OAuth2.0 ???? www.qq.com/login.html? ??? ? ????. ?, http://pay.qq.com, http://music.qq.com, http://qq.com? OAuth2.0 ??? ??? ? ????

3. ?? ?? ???? ?3??? ??? ??. ??? ??? ?? ?? ??? ? ??? ????. ?3?? ?? ??? ???? ? ??? ??? ??? ? ????

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

????? ??:

https://open.weixin.qq .com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect (????? ????? ?????)

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

function Get_Code()  //獲取code
{
//構(gòu)造請求地址
$code_url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=微信公眾號appid&redirect_uri=請求功后回調(diào)地址&response_type=code&scope=snsapi_userinfo&state=STATE #wechat_redirect";
//跳轉(zhuǎn)到請求地址,應(yīng)為本省設(shè)置了回調(diào)地址,所以不需要使用file_get_content()來請求接口。
header("location:" . $code_url);
exit;
}

3. ??? ??? access_token ? openid

Interface? ????? ? ????. 4. access_token? ???? ?????


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

?????: https://api.weixin.qq.com/sns/auth?access_token=ACCESS_TOKEN&openid=OPENID

/**
 *  通過獲取到的code來獲取access_token和openid 
 *  $code為獲取到的code
 * 接口的參數(shù)注意換成自己的,如appid和secret
 */
function GetAccess_Token($code)
{
$get_access_token_url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=appid&secret=secret&code=$code&grant_type=authorization_code";
$res = http_url($get_access_token_url);
return json_decode($res, true);
}

5. , ?? ?? access_token

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

?????:

https://api.weixin.qq.com/sns/oauth2/refresh_token?appid=APPID&grant_type=refresh_token&refresh_token=REFRESH_TOKEN

/**
 * 檢查access_token是否有效
 * 
 */
function CkeckAccessToken($access_token, $openid)
{
    $check_url = "https://api.weixin.qq.com/sns/auth?access_token=$access_token&openid=$openid";
    $res = http_url($check_url);
    $result = json_decode($res, true);
    if (isset($result['errmsg']) && $result['errmsg'] == 1) {
        return 1;       //access_token有效   
    } else {
        return 0;       //access_token無效 
    }
}

6. ??? ?? ??

WeChat ?? ?? ? ??? ?? ??? ???????:

https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN

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

/** * 獲取用戶基本信息 *  */
function Get_User_Info($access_token, $openid){   
     $get_user_info = "https://api.weixin.qq.com/sns/userinfo?access_token=$access_token&openid=$openid&lang=zh_CN";   
      $res = http_url($get_user_info);   
       return json_decode($res, true);
   }

獲取到用戶信息數(shù)據(jù):

{   
    "openid":" OPENID",
    " nickname": NICKNAME,
    "sex":"1",
    "province":"PROVINCE"
    "city":"CITY",
    "country":"COUNTRY",
    "headimgurl":       "http://thirdwx.qlogo.cn/mmopen/g3MonUZtNHkdmzicIlibx6iaFqAc56vxLSUfpb6n5WKSYVY0ChQKkiaJSgQ1dZuTOgvLLrhJbERQQ4eMsv84eavHiaiceqxibJxCfHe/46",
    "privilege":[ "PRIVILEGE1" "PRIVILEGE2"     ],
    "unionid": "o6_bmasdasdsad6_2sgVt7hMZOPfL"
}

WeChat ?? ?? ? ??? ?? ??? ??下面上完整代碼:

<?php
    //跳轉(zhuǎn)第三方頁面,獲取用戶基本信息
    // 這是請求頁面也是code的回調(diào)頁面
    session_start();                //啟動session
    if (isset($_GET[&#39;code&#39;])) {     //判斷是否有code傳過來,如果沒有調(diào)用函數(shù)請求code
          $res = GetAccess_Token($_GET[&#39;code&#39;]);     //使用code獲取access_token和openid
          if (CkeckAccessToken($res[&#39;access_token&#39;], $res[&#39;openid&#39;]) == 0) {     //判斷access_token是否有效,如果無效獲取新的access_token
                  $res = GetRefresh_Token($res[&#39;refresh_token&#39;]);                    //或缺新的access_token
            }
           $userinfo = Get_User_Info($res[&#39;access_token&#39;], $res[&#39;openid&#39;]);        //獲取用戶信息
           $_SESSION[&#39;userinfo&#39;] = $userinfo;                                      //將用戶信息存入session中
           $next_url = &#39;http://web/index.php&#39;;                                     //下一個(gè)頁面地址
           header("location:" . $next_url);                                       //獲取到信息后跳轉(zhuǎn)到其他頁面
           exit;
      } else { 
         //獲取code
      Get_Code();
      }
    function Get_Code()  //獲取code{
    $code_url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=appid&redirect_uri=回調(diào)地址&response_type=code&scope=snsapi_userinfo&state=STATE #wechat_redirect";
    header("location:" . $code_url);
    exit;
    }
    /**
    *  通過獲取到的code來獲取access_token和openid
    *
    */
    function GetAccess_Token($code){
        $get_access_token_url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=appid&secret=secret&code=$code&grant_type=authorization_code";
        $res = http_url($get_access_token_url);
        return json_decode($res, true);
        }
    /**
     * 檢查access_token是否有效
     *
    */
    function CkeckAccessToken($access_token, $openid){
    $check_url = "https://api.weixin.qq.com/sns/auth?access_token=$access_token&openid=$openid"; 
    $res = http_url($check_url);
    $result = json_decode($res, true);
    if (isset($result[&#39;errmsg&#39;]) && $result[&#39;errmsg&#39;] == 1) {
       return 1;       //access_token有效 
     } else { 
       return 0;       //access_token無效 
     }
    }

    /**
     * 如果獲取到的access_token無效,通過refresh_token來刷新access_token 
     */
    function GetRefresh_Token($refresh_token){
        $get_refresh_token_url = "https://api.weixin.qq.com/sns/oauth2/refresh_token?appid=appid&grant_type=refresh_token&refresh_token=$refresh_token";
        $res = http_url($get_refresh_token_url);
        return json_decode($res, true);
     }
    /**
     * 獲取用戶基本信息
     *
     */
    function Get_User_Info($access_token, $openid){
        $get_user_info = "https://api.weixin.qq.com/sns/userinfo?access_token=$access_token&openid=$openid&lang=zh_CN";
        $res = http_url($get_user_info);
        return json_decode($res, true);}
    //自定義請求接口函數(shù),$data為空時(shí)發(fā)起get請求,$data有值時(shí)發(fā)起post請求
    function http_url($url,$data=null){
       $ch = curl_init();
        curl_setopt($ch,CURLOPT_URL,$url);
        curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
        curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);
        curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);
        if(!empty($data)){    
            curl_setopt($ch,CURLOPT_POST,1);
            curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
         }
         $res = curl_exec($ch);
         if(curl_errno($ch)){
           echo "error:".curl_error($ch);
           exit;
          }
          curl_close($ch);
          return $res;
          }


? ?

? ??? 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
???
Tiktok ? ?? ?? ??? ?? ?? ?? https tiktok ? ?? ?? ? ??? ?? Tiktok ? ?? ?? ??? ?? ?? ?? https tiktok ? ?? ?? ? ??? ?? May 22, 2025 pm 04:24 PM

Douyin ? ??? ??? ??? https://www.douyin.com/???. ??? ???? ??? ?????. 1. ???? ??; 2. URL https://www.douyin.com/? ??????. 3. "???"??? ???? ??? ??? ??????. 4. ?? ????? ??????. 5. ?? ???. ? ??? ????, ??, ?? ??, ??? ??? ? ?? ???? ??? ?? ??? ???? ?? ??? ??, ?? ???, ??? ?? ?? ? ??? ??? ?? ??? ????.

COPY COMICS (?? ? ??? ??) _Copy Comics (NBA) ??? ??? ?? ?? COPY COMICS (?? ? ??? ??) _Copy Comics (NBA) ??? ??? ?? ?? Jun 05, 2025 pm 04:12 PM

??? ???? ?? ?? ? ???? ?? ????? ?????. ???? ????? ????? ?? ????? ???? ???? ? ?? ???? ????? ??? ???? ?? ??? ?? ? ????. ???? ????? ??? ??? ???? ??? ???? ??? ???? ? ????. Copy Comics?? ???? ?? ??? ?? ??? ?? ?? ??? ?? ??? ?? ?? ?????, ???? ???? ?? ??? ???, ???? ?? ??? ???? ??? ?? ??? ??? ? ????.

UC ???? ?? QQ ????? ?? ?? ? ????? UC ? QQ ????? ?? ?? ? ???? UC ???? ?? QQ ????? ?? ?? ? ????? UC ? QQ ????? ?? ?? ? ???? May 22, 2025 pm 08:33 PM

UC ???? ?? QQ ????? ???? ?? ??? ?? ????. 1. UC ????? ???? ? ??? ?????? ??? ???? ????? ?????. 2. QQ ????? Tencent ???? ???? ??? ??? ??? ????? ?????.

AI Writing Software? ?? ? ?? 10 ?? AI ?? ????? ??? ?????. AI Writing Software? ?? ? ?? 10 ?? AI ?? ????? ??? ?????. Jun 04, 2025 pm 03:27 PM

2025 ? ?? ?? ???? ??? ?? ???? ??? ??? ?? ??? ? ??? ???? ????? ?? ??, ?? ?? ? ?? ???? ?? ?? ????? ??? ?? 10 ?? ??? ? AI ?? ????? ?? ?????.

?? ??? ?? NIS ??? ?? ???? ????? ??????. NIS Comics ??? ???? ?? ?? ? ??? ?? ??? ?? NIS ??? ?? ???? ????? ??????. NIS Comics ??? ???? ?? ?? ? ??? Jun 12, 2025 pm 08:18 PM

?? ???? ?? ?? ?? ?? ? ?? ?? ??? ? Nice Comics? ????? ?? ??? ?? ??? ?????. ?? ?? ??? ?? ? ??? ?? ???? ??? ???? ?? ??? ???? ??????????. ???? ??? ? ????? ???? ??? ?? ??? ?? NES Comics? ???? ???? ??? ?? ?? ? ??? ???? ??? ?? ??? ?? ? ????. ???? ???? ???? ??? ??? ?? ?????, ?? ??? ??? ?? ???? ?? ??? ??????!

??? ? ??? ?? ?? ?? ??? ?? (? ??? ??) ??? ?? ??? ? ??? ?? ?? ?? ??? ?? (? ??? ??) ??? ?? Jun 12, 2025 pm 08:06 PM

Frogman Comics? ???? ??? ?? ??? ???? ??? ??? ?? ??? ?? ?? ?? ?????? ? ?? ????????. ??? ???? ???? ???? ???? ???? ??? ???? ????? ???? ??? ??? ????. ??? ?? ??? ??? ? ???? ??? ??, ??? ? ?? ???? ???? ??? ????? ??? ??? ??? ????. ?? ??? ???? ???? ?? ???? ??? ?? ? ????. ???? ??? ? ????? ???? ?? ?? ???? ?? ?? ??? ??? ?? ?? ??? ?? ??? ?? ? ? ????.

Baozi Comics (??) _ Baozi Comics (New Entrance) 2025 Baozi Comics (??) _ Baozi Comics (New Entrance) 2025 Jun 05, 2025 pm 04:18 PM

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

b ?? ?? ?? _ ?? ?? b ?? b ?? ?? ?? _ ?? ?? b ?? May 26, 2025 pm 07:12 PM

2025b Anhui? ?? ?? ? ???? ??? ????. https://www.marketwebb.co/zh-cn/join?ref=507720986&amp;type=wenzi; Binance Exchange? ??, ??, ??, ??, ?? ? ????? ? 180 ??? ??? ???? ???? ??? ?? ?? ??????. 600 ?? ?? ?? ??? ???? ? ????? 2 ? 7 ?? ?? ?? ? ???? ???? ????.

See all articles