* return http response $res */ public function delete_user($userid) { $tk = $this->get_tk(); $get_url = "https://qyapi.weixin.qq.com/cgi-bin/user/delete?access_token={$tk}&userid={$userid}"; $arrReply = array("userid" => $userid); $data_string = json_encode($arrReply, JSON_UNESCAPED_UNICODE); $res = $this->httpGet($get_url, $data_string); return $res; } /** * webserver invite member to follow lancy weixin * @param: string $userid * return http response $res */ public function invite_user($userid) { $tk = $this->get_tk(); $post_url = "https://qyapi.weixin.qq.com/cgi-bin/invite/send?access_token={$tk}"; $arrReply = array("userid" => $userid); $data_string = json_encode($arrReply, JSON_UNESCAPED_UNICODE); $res = $this->httpPost($post_url, $data_string); return $res; } } $wx = new weixin(); //$wx -> create_user(array('userid'=>'zforce1111', 'name'=>'唐兆寅', 'weixinid'=>'zforce1111', 'depid'=>[1,3])); //$wx -> invite_user('zforce1111'); $wx->delete_user('test01'); $wx->delete_user('test02');