background image

PHP

代码 PHP 获取 MSN 好友列表类的实现代码

本文主要为大家分享介绍 PHP 获取 MSN 好友列表类的实现代码,需要的朋友参考下
代码如下:
 
<?php

error_reporting

(7);

class

 msn

{

private

 

$startcomm

 = 0;

private

 

$username

 = '';

private

 

$password

 = '';

private

 

$commend

 = '';

private

 

$domain

 = '';

private

 

$socket

 = '';

private

 

$challenge

 = '';

private

 

$status

 = 

array

();

private

 

$data

 = 

array

();

function

 set_account(

$username

$password

)

{

$this

->username = 

$username

;

$this

->password = 

$password

;

}
 

function

 getData(){

$buffer

="";

while

 (!

feof

(

$this

->socket)) {

$buffer

 .= 

fread

(

$this

->socket,1024);

if

 (preg_match("//r/",

$buffer

)) {

break

;

}
}

$this

->checkData(

$buffer

);

}
 

function

 getData2() {

$buffer

="";