123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Net;
- using System.Drawing;
- namespace Ant.Service.Utilities
- {
- //public static class QQIsLine
- //{
- // /// <summary>
- // /// 判断QQ是否在线
- // /// </summary>
- // /// <param name="qq"></param>
- // /// <returns></returns>
- // public static bool CheckQQOnline(string qq)
- // {
- // WebRequest webRequest = WebRequest.Create("http://wpa.qq.com/pa?p=2:" + qq + ":4");
- // WebResponse webResponse = webRequest.GetResponse();
- // Bitmap myImage = new Bitmap(webResponse.GetResponseStream());
- // if (myImage.Width == 23)
- // {
- // return true;
- // }
- // string str = "";
- // switch (myImage.Width)
- // {
- // case 23:
- // str = "QQ在线"; break;
- // case 16:
- // str = "微信在线"; break;
- // case 77:
- // str = "苹果在线"; break;
- // }
- // return false;
- // }
- //}
- }
|