<h2 style=”box-sizing: border-box; font-family: “line-height:30px; color: #555555; margin: 0px -20px 10px; font-size: 20px; border-width: 1px 0px 1px 3px; border-style: solid; padding: 0px 15px; background: #FAFAFA; border-color: #EEEEEE #EEEEEE #EEEEEE #AE74EC; white-space: normal;”>前言
<p style=”box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; color: #555555; font-family: “font-size:15px; white-space: normal; background-color: #ffffff;”>随着ADG越做越大,人数也不断上升,官方前台满足不了多数人的选择,更多的人喜欢自己的第三方前台,可是又想要官方的前台功能,这可导致了很多人需要通过抓包来实现自己想要的功能。在此,公布部分前台API。注意,只提供php代码,js代码,自己随便找个前台偷偷就好- -
<p style=”box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; color: #555555; font-family: “font-size:15px; white-space: normal; background-color: #ffffff;”>API①:切换手机DG类型
//手机在线状态
if ($_GET['do'] == 'yewu' && $_GET['info'] == 'phonetype') {
$url = "http://{$ini['skeyurl']}/api/submit.php?act=setphonetype&id={$_SESSION['sid']}&uin={$_SESSION['qq']}&ntype={$_POST['type']}";
$sc = json_decode(get($url, 'get', 10), true);
if ($sc['code'] == 1) {
$info = json_encode(array('code' => 0, 'error' => $sc['msg']));
} else {
$info = json_encode(array('code' => 1, 'error' => $sc['msg']));
}
}
API②:保存微视链接
//微视链接提交
if ($_GET[‘do’] == ‘yewu’ && $_GET[‘info’] == ‘wsvurl’) {
$url = “http://{$ini['skeyurl']}/api/submit.php?act=savewsvurl&id={$_SESSION['sid']}&uin={$_SESSION['qq']}&wsvurl=“ . urlencode($_POST[‘wsvurl’]);
$sc = json_decode(get($url, ‘get’, 5), true);
if ($sc[‘code’] == 1) {
$info = json_encode(array(‘code’ => 0, ‘error’ => $sc[‘msg’]));
} else {
$info = json_encode(array(‘code’ => 1, ‘error’ => $sc[‘msg’]));
}
}
API③:获取代挂信息
//获取代挂信息 最新
if($_GET['do'] == 'yewu' && $_GET['info'] == 'dginfo'){
$url = "http://{$ini['skeyurl']}/api/submit.php?act=query&id={$_SESSION['sid']}";
//$url = "http://127.0.0.1/api/submit.php?act=query&id={$_SESSION['sid']}";
$sc = json_decode(get($url,'get',10),true);
if($sc['code']==1 && $sc['data']!=null){
$enddate=intval((strtotime($sc['enddate'])-time())/86400);
$info = json_encode(array('code'=>0,'error'=>'信息获取成功','qq'=>$qq,'dgtime'=>$enddate,'data'=>$sc['data'], 'vurl' => $sc['vurl'],'ustar'=>$sc['black'],'black'=>$sc['black'],'guard'=>'一切正常'));
}else{
$info = json_encode(array('code'=>1,'error'=>'信息获取失败'));
}
}
API④:引导删除QQ
if ($sc[‘code’] == -30){
$info = json_encode(array(‘code’=>-30,’error’=>”你的QQ已存在,必须删除后才能继续添加,系统将引导您完成删除操作。”,’url’=>”http://{$ini['skeyurl']}/adg.php?qq=“ . $qq));
}