那些听不见音乐的人以为跳舞的人疯了。
无言博客
一个菜鸟程序员,在复制粘贴的道路上越走越远!!!
PHP无权限QQ群链接生成,群分享源码
无言博客 258 2020-3-17
<?php
/**
 * 获取QQ群连接
 * @param string $qun 群号
 * @return json
 * @example 调用方法 例: echo qun('936952391');
 * @author Reaper <a@0oo.ren>
 * @request https://www.52bz.la
 */
function qun($qun, $ref = 'https://qun.qq.com/proxy.html?callback=1&id=1'){
    $ch = curl_init('https://qun.qq.com/proxy/domain/shang.qq.com/wpa/g_wpa_get?guin=' . $qun);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_REFERER, $ref);
    curl_setopt($ch, CURLOPT_USERAGENT, 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4 (compatible; Baiduspider/2.0; +https://www.52bz.la)');
    $content = curl_exec($ch);
    curl_close($ch);
    $data = json_decode($content, 1);
    $data = ['code' => 200, 'msg' => '获取成功!', 'data' => 'https://shang.qq.com/wpa/qunwpa?idkey=' . $data['result']['data'][0]["key"]];
    return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
}
END
留言
落寞
2020-07-12 18:31
落寞到此一踩!

发表评论: