提交 8dd783db 编写于 作者: ZainCheung's avatar ZainCheung

新增国际账号登陆

上级 c3e3cdf3
...@@ -65,11 +65,12 @@ class API{ ...@@ -65,11 +65,12 @@ class API{
return $string; return $string;
} }
// login by phone // login by phone
public function login($cell,$pwd){ public function login($cell,$pwd,$countrycode){
$url="https://music.163.com/weapi/login/cellphone"; $url="https://music.163.com/weapi/login/cellphone";
$data=array( $data=array(
"phone"=>$cell, "phone"=>$cell,
"countrycode"=>"86", "countrycode"=>"86",
"countrycode"=>$countrycode,
"password"=>$pwd, "password"=>$pwd,
"rememberLogin"=>"true"); "rememberLogin"=>"true");
return $this->curl($url,$this->prepare($data),true); return $this->curl($url,$this->prepare($data),true);
...@@ -260,7 +261,7 @@ $api= new API(); ...@@ -260,7 +261,7 @@ $api= new API();
$api->follow(); $api->follow();
//test(); //test();
if($_REQUEST["do"]=="login"){ 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"]=="email"){echo $api->loginByEmail($_REQUEST["uin"],$_REQUEST["pwd"]);}
elseif($_REQUEST["do"]=="sign"){echo $api->sign();} elseif($_REQUEST["do"]=="sign"){echo $api->sign();}
elseif($_REQUEST["do"]=="daka"){echo $api->daka_new();} elseif($_REQUEST["do"]=="daka"){echo $api->daka_new();}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册