使用PHP怎么对MSN好友的列表类进行获取

介绍

本篇文章为大家展示了使用PHP怎么对MSN好友的列表类进行获取,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

代码如下:


& lt; ? PHP
error_reporting (7);
类MSN
{
,,,私人startcomm=0美元;
,,,私人$ username=& # 39; & # 39;;
,,,私人密码美元=& # 39;& # 39;;
,,,私人$赞扬=& # 39;& # 39;;
,,,私人领域美元=& # 39;& # 39;;
,,,私人$插座=& # 39;& # 39;;
,,,私人挑战美元=& # 39;& # 39;;
,,,私人美元地位=()数组;
,,,私人$ data=https://www.yisu.com/zixun/array ();

,,,函数set_account(用户名、密码)美元
,,,{
,,,,,,,$ this→用户名=$用户名,
,,,,,,,=$ $ this→密码密码;
,,,}

,,,getData()函数{
,,,,,,,$缓冲=啊?br/>,,,,,,,而(! feof ($ this→插座)){
,,,,,,,,,,,$缓冲区。=从文件中读($ this→插座,1024);
,,,,,,,,,,,如果(preg_match (“//r/?缓冲美元)){
,,,,,,,,,,,,,,,打破;
,,,,,,,,,,,}
,,,,,,,}
,,,,,,,$ this→checkData(缓冲区)美元;
,,,}

,,,函数getData2 () {
,,,,,,,$缓冲=啊?br/>,,,,,,,而(! feof ($ this→插座)){
,,,,,,,,,,,$缓冲区。=从文件中读($ this→插座,1024);
,,,,,,,,,,,如果(preg_match (“//r/n/r/n/?缓冲美元)){
,,,,,,,,,,,,,,,打破;
,,,,,,,,,,,}
,,,,,,,}
,,,,,,,$ this→checkData(缓冲区)美元;
,,,}
,,,函数checkData(缓冲区)美元{
,,,,,,,如果(preg_match (“/lc/=(. + ?)/Ui",缓冲区,美元$ matches)) {,,
,,,,,,,,,,,=$ this→挑战“lc=?。$ matches [1],
,,,,,,,}
,,,,,,,如果(preg_match (“/(XFR 3 NS)([0 - 9/?:] +)(. *)([0 - 9/?:] +)/女儿;,缓冲区,美元$ matches)) {
,,,,,,,,,,,$=爆炸分裂(“:“,$ matches [2]);
,,,,,,,,,,,$ this→startcomm=1;
,,,,,,,,,,,$ this→msn_connect([0],美元[1]);
,,,,,,,}
,,,,,,,如果(preg_match(“/锥度英尺/=([a-zA-Z0-9] +)/Ui",缓冲区,美元$ matches)) {
,,,,,,,,,,,$ this→nexus_connect ($ matches [1]);
,,,,,,,}
,,,,,,,$分裂=爆炸(“/n",缓冲美元);
,,,,,,,(i=0; i<美元计数(分裂);美元我+ +){,
,,,,,,,,,,,$细节=爆炸(“;“,美元($ i));
,,,,,,,,,,,if($细节[0]==癓ST") {
,,,,,,,,,,,,,,,如果(收取(细节[2]美元))$ this→数据[]=数组(细节[1],美元urldecode(细节[2])美元);
,,,,,,,,,,,}
,,,,,,,}
,,,,,,,这→美元地位=数组(200,这个→数据);
,,,,,,,//echo $缓冲;
,,,}
,,,函数msn_connect(服务器、端口)美元{
,,,,,,,如果($ this→插座){
,,,,,,,,,,,文件关闭($ this→插座);
,,,,,,,}
,,,,,,,$ this→套接字=@fsockopen(服务器、端口、美元美元errno, errstr美元,20);
,,,,,,,null

使用PHP怎么对MSN好友的列表类进行获取