Skip to content

Commit

Permalink
新增国际账号登陆
Browse files Browse the repository at this point in the history
  • Loading branch information
ZainCheung committed Sep 1, 2020
1 parent c3e3cdf commit 8dd783d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ public function index(){
return $string;
}
// login by phone
public function login($cell,$pwd){
public function login($cell,$pwd,$countrycode){
$url="https://music.163.com/weapi/login/cellphone";
$data=array(
"phone"=>$cell,
"countrycode"=>"86",
"countrycode"=>$countrycode,
"password"=>$pwd,
"rememberLogin"=>"true");
return $this->curl($url,$this->prepare($data),true);
Expand Down Expand Up @@ -260,7 +261,7 @@ public function playlist($playlist_id){
$api->follow();
//test();
if($_REQUEST["do"]=="login"){
echo $api->login($_REQUEST["uin"],$_REQUEST["pwd"]);}
echo $api->login($_REQUEST["uin"],$_REQUEST["pwd"],$_REQUEST["pwd"]);}
elseif($_REQUEST["do"]=="email"){echo $api->loginByEmail($_REQUEST["uin"],$_REQUEST["pwd"]);}
elseif($_REQUEST["do"]=="sign"){echo $api->sign();}
elseif($_REQUEST["do"]=="daka"){echo $api->daka_new();}
Expand Down

0 comments on commit 8dd783d

Please sign in to comment.