日本好好热aⅴ|国产99视频精品免费观看|日本成人aV在线|久热香蕉国产在线

  • <cite id="ikgdy"><table id="ikgdy"></table></cite>
    1. 西西軟件園多重安全檢測下載網(wǎng)站、值得信賴的軟件下載站!
      軟件
      軟件
      文章
      搜索

      首頁編程開發(fā)其它知識 → Q寵大樂斗協(xié)議獲取好友信息代碼

      Q寵大樂斗協(xié)議獲取好友信息代碼

      相關軟件相關文章發(fā)表評論 來源:本站整理時間:2010/10/24 14:17:09字體大。A-A+

      作者:佚名點擊:477次評論:0次標簽: Q寵大樂斗 協(xié)議

      • 類型:網(wǎng)絡認證大。1.2M語言:中文 評分:6.6
      • 標簽:
      立即下載

      樂斗獲取好友信息十分簡單,只需要攜帶cookie訪問 http://fight.pet.qq.com/cgi-bin/petpk?cmd=view&kind=1&sub=1就可以了

         比較難的是分析個參數(shù)的意義,需要多個好友相互對比

             服務器返回如下:

         {result:'0',msg:'',info:[{uin:'xxxxxxxx',flag:'0',yflag:'0',qqflag:'0',name:'樂斗菜菜', lilian:'19',enable:'1', factionid:'0'},{uin:'xxxxxxxx',flag:'0',yflag:'0',qqflag:'0',name:'樂斗小王子', lilian:'37',enable:'2', factionid:'10007'},{uin:'xxxxxxxx',flag:'0',yflag:'0',qqflag:'2',name:'Going_Down', lilian:'32',enable:'1', factionid:'235884'},................

         其中uin為好友的QQ號碼 ,flag沒去研究 yflag為會員黃鉆等信息  name為網(wǎng)名    lilian為等級  enable為0則已經(jīng)和他打斗過  1 沒有打斗過  2他有拳套,沒有打斗過

         factionid為幫派ID

          給出代碼:

         獲取好友

      public Dictionary<string,QchongEntity> getAllFriend()
      {
      Dictionary<string,QchongEntity> entitys =new Dictionary<string,QchongEntity>();

      HttpHelper.Encoding = Encoding.GetEncoding("gb2312");
      string result = HttpHelper.GetHtml("http://fight.pet.qq.com/cgi-bin/petpk?cmd=view&kind=1&sub=1", user.Cookie);
      result = result.Replace("", "");
      if (result !="")
      {
      //歷練導致少取到5個號碼
      Regex r =new Regex("(uin:')(?<qq>[0-9]{5,11}?)(',flag:'[0-9]{1}',yflag:'[0-9]{1}',qqflag:')(?<qqflag>[0-9]{1}?)(',name:')"
      +"(?<name>.+?)(',lilian:')(?<lilian>[0-9]{1,2}?)(',enable:')(?<enable>[0-9]{1}?)(',factionid:')(?<factionid>[0-9]{1,6}?)(')", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);

      MatchCollection m = r.Matches(result);

      for (int i =0; i < m.Count; i++)
      {
      try
      {
      QchongEntity entity =new QchongEntity();
      entity.UserName = m[i].Groups["qq"].Value;
      entity.Qqflag = Convert.ToInt32(m[i].Groups["qqflag"].Value);
      entity.NickName = m[i].Groups["name"].Value;
      entity.Liliang = m[i].Groups["lilian"].Value;
      entity.Factionid = m[i].Groups["factionid"].Value;
      entity.Enable = Convert.ToInt32(m[i].Groups["enable"].Value);
      entitys.Add(entity.UserName,entity);
      }
      catch (Exception)
      {
      continue;
      }
      }
      }

      AllFriend = entitys;
      return entitys;
      }

        相關評論

        閱讀本文后您有什么感想? 已有人給出評價!

        • 8 喜歡喜歡
        • 3 頂
        • 1 難過難過
        • 5 囧
        • 3 圍觀圍觀
        • 2 無聊無聊

        熱門評論

        最新評論

        發(fā)表評論 查看所有評論(0)

        昵稱:
        表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
        字數(shù): 0/500 (您的評論需要經(jīng)過審核才能顯示)