强子指定地区
This commit is contained in:
@@ -216,4 +216,64 @@ class AccountAddress
|
|||||||
echo json_encode(['code'=>1,'data'=>$account_info]);
|
echo json_encode(['code'=>1,'data'=>$account_info]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//强子地区列表
|
||||||
|
public function qiangzi_address()
|
||||||
|
{
|
||||||
|
$params = array(
|
||||||
|
"username" => $_GET['user'],
|
||||||
|
"password" => $_GET['password'],
|
||||||
|
);
|
||||||
|
|
||||||
|
$login_url = 'http://qixun.woniuruanjian.com:2222/main/raduserLogin';
|
||||||
|
|
||||||
|
$login_content = linkcurl($login_url,'POST',$params);
|
||||||
|
|
||||||
|
preg_match_all('/set\-cookie:([^\r\n]*); path/i', $login_content, $m);
|
||||||
|
|
||||||
|
$cookie = $m[1][0];
|
||||||
|
|
||||||
|
|
||||||
|
$url = 'http://qixun.woniuruanjian.com:2222/panel/index';
|
||||||
|
|
||||||
|
$header = array();
|
||||||
|
$header[] = "Cookie:".$cookie;
|
||||||
|
$html = linkcurl($url,'POST',[],$header,0);
|
||||||
|
|
||||||
|
//获取所有大分类
|
||||||
|
preg_match("/<td id=\"pools\">(.*?)<\/td>/is", $html, $result);
|
||||||
|
|
||||||
|
$result = str_replace('span','label',$result[0]);
|
||||||
|
// echo $result;die;
|
||||||
|
echo json_encode($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
//强子
|
||||||
|
public function qiangzi()
|
||||||
|
{
|
||||||
|
$data = json_decode(file_get_contents("php://input"),true);
|
||||||
|
$login_url = 'http://qixun.woniuruanjian.com:2222/main/raduserLogin?username=jt3936&password=717';
|
||||||
|
$params = array(
|
||||||
|
"username" => $data['account'],
|
||||||
|
"password" => $data['password'],
|
||||||
|
);
|
||||||
|
$login_content = linkcurl($login_url,'POST',$params);
|
||||||
|
|
||||||
|
preg_match_all('/set\-cookie:([^\r\n]*); path/i', $login_content, $m);
|
||||||
|
|
||||||
|
$cookie = $m[1][0];
|
||||||
|
|
||||||
|
$params = array(
|
||||||
|
"act" => 'save',
|
||||||
|
"username" => $data['account'],
|
||||||
|
"poolids[]" => implode(',',$data['list']),
|
||||||
|
);
|
||||||
|
|
||||||
|
$url = 'http://qixun.woniuruanjian.com:2222/panel/index';
|
||||||
|
|
||||||
|
$header = array();
|
||||||
|
$header[] = "Cookie:".$cookie;
|
||||||
|
$data = linkcurl($url,'POST',$params,$header);
|
||||||
|
echo json_encode(['code'=>1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user