微信分组

<?php

header(‘Content-type: text/html; charset=UTF8‘);


$url = "http://helloiuh.applinzi.com/get_token.php";
$access_token = file_get_contents($url);

 

$jsonmenu = ‘{"openid":"o0_A1w_JQ96_4bczH9G9o-2LkKFc","to_groupid":100}‘;

 

 

$url = "https://api.weixin.qq.com/cgi-bin/groups/members/update?access_token=".$access_token;

$result = https_request($url, $jsonmenu);

var_dump($result);

 

function https_request($url,$data = null){

$curl = curl_init();

curl_setopt($curl, CURLOPT_URL, $url);

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);

curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);

if (!empty($data)){

curl_setopt($curl, CURLOPT_POST, 1);

curl_setopt($curl, CURLOPT_POSTFIELDS, $data);

}

curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

$output = curl_exec($curl);

curl_close($curl);

return $output;

}

 

?>

 

微信分组

上一篇:ASP.NET MVC 微信公众号支付,微信公众平台配置


下一篇:适配iOS9时候,qq和微信第三方登陆一直失败-canOpenURL: failed for URL: