日期:2014-05-17 浏览次数:21041 次
string A = "这是第一个帖子";
string B = "这是第一个帖子的内容";//方便起见,一下每个参数隔开
string.Format(";
agicname=;
&magicid=;
&verify=87188a1f;
&cyid=0;
&ajax=1;
&iscontinue=0;
&atc_title={0};
&usernames=;
&atc_tags=;
&atc_money=0;
&atc_rvrc=0;
&replyrewardcredit=money;
&replyreward[replyrewardnum]=;
&replyreward[replyrewardtimes]=;
&replyreward[replyrewardreptimes]=1;
&replyreward[replyrewardchance]=10;
&atc_usesign=1&atc_autourl=1;
&atc_convert=1;
&step=2;
&pid=;
&action=new;
&fid=42;
&tid=0;
&article=0;
&special=0;
&_hexie=7b87286f;
&atc_content={1}", A, B);
string form = Http.PostHtml("http://bbs.eyuyao.com/post.php?fid=42#breadCrumb", post, ref cookie, Encoding.GetEncoding("gb2312"));//提交后提示:非法请求,请返回重试
[self.textViewContent resignFirstResponder];
NSString *urlString = [NSString stringWithFormat:@"http://bbs.csdn.net/posts?topic_id=%@",self.topicId];
ASIFormDataRequest *requestForm = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:urlString]];
requestForm.delegate = self;
[requestForm setPostValue:self.textViewContent.text forKey:@"post[body]"];
[requestForm startAsynchronous];
//cookie.Expires = DateTime.Now.AddYears(1);
string url = "https://passport.csdn.net/ajax/accounthandler.ashx";
string postData = "t=log&u=用户命&p=密码&remember=0&f=b&rand=0.1";
string loginResult = SendDataByGET(url, postData, ref cookieContainer);
string aaaaa = UrlEncode("Test Post");