论坛灌水机
抓取页面
http://forum.csdn.net/OpenApi/forumapi.asmx

解决方案 »

  1.   


        void postText(Guid forumId, string subject, string body, csdn.forumapi.EditorType type, int point)
        {
          csdn.forumapi.Post post = new csdn.forumapi.Post();
          post.forumId = forumId;
          post.isAskExpert = false;
          post.expertUserName = "1";
          post.point = point;
          post.subject = subject;
          post.editor = type;
          post.body = body;
          post.tag = "2";      csdn.forumapi.Error error = null;
          string url = null;
          bool succeed = false;
          try
          {
            succeed = _csdnapi.Post(_csdnIdentity, post, out error, out url);
          }
          catch (Exception e)
          {
            succeed = false;
            reportError("发贴", e.ToString());
            return;
          }
          if (!succeed)
            reportError("发贴", error);
          else
            reportSuccess("发贴成功, \r\n新贴的地址为: " + url);
        }