background image

%2Fmessenger.msn.com,tw=0,kpp=1,kv=4,ver=2.1.6000.1,rn=1lgjBfIL,tpf=b0735e3a873dfb5e75
054465196398e0
list(, , , , $this->getCode) = explode(" ", trim($data));
//echo $data;
if (empty($this->sshLogin))
$this->reLoginTalk(); // 重新获取登陆服务器地址
else
$this->getLoginCode($this->sshLogin);
}
}
function reLink($server, $port) // 重置连接 {
$this->connect = null;
$this->server = $server;
$this->port = $port;
$this->trID = 1;
$this->startTalk();
}
function reLoginTalk() // 重新获取服务器地址 {
$ch = curl_init($this->nexus);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$header = curl_exec($ch);
//print_r($header);
curl_close($ch);
preg_match ('/DALogin=(.*?),/', $header, $out); // 捕捉服务器登陆匹配
//print_r($out);
if (isset($out[1])) {
$this->getLoginCode($out[1]);
}
else {
//return false;
exit("无法捕捉到登陆服务器的 URL");
}
}
function getLoginCode($slogin) // 获取登陆代码 {
//echo($this->getCode);
if (!is_null($this->getCode)) {
$ch = curl_init("https://" . $slogin);
$loginInfo = array(
"Authorization:Passport1.4rgVerb=GET,OrgURL=http%3A%2F%2Fmessenger%2Emsn
%2Ecom,sign-in=" . $this->userName . ",pwd=" . $this->passWord . "," . $this->getCode,