http://www.sufeinet.com/plugin.php?id=keke_group

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 2963|回复: 4

[求助] 请问POST提交后出现的奇怪错误.

[复制链接]
发表于 2015-3-13 10:39:11 | 显示全部楼层 |阅读模式
我想做一个http://www.abanyou.cn/网站的自动注册机.以下是C#注册方法的代码.

            UTF8Encoding utf8 = new UTF8Encoding();
            Byte[] encodedBytes = utf8.GetBytes(name);//编码
            name = System.Text.Encoding.UTF8.GetString(encodedBytes, 0, (int)encodedBytes.Length);
            string registerURL = "http://www.abanyou.cn/index.php?c=passport&a=regpost";
            string postData = string.Format("forward=&username={0}&password={1}&confirmpassword={2}&email={3}&qq={4}&checkcode={5}&gender={6}&ageyear=1979&agemonth=2&ageday=18&marrystatus=2&education=6&salary=2&height=157&provinceid=177&cityid=189&agree=true"
                , name, pwd, pwd, email, qq, valide, sex);
            string html = httpHelper.PostAndGetHtml(registerURL, postData, null, "http://www.abanyou.cn/index.php?c=passport&a=reg", false, Encoding.UTF8);

            return html;

提交后显示

SMTP Error: Data not accepted.<p>SMTP server error: Error: content rejected.http://mail.qq.com/zh_CN/help/content/rejectedmail.html
</p>
SMTP Error: Data not accepted.<p>SMTP server error: Error: content rejected.http://mail.qq.com/zh_CN/help/content/rejectedmail.html
</p>

哪位兄弟能帮我解决一下.




1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
发表于 2015-3-13 11:06:39 | 显示全部楼层
提供下你抓到的包看看吧。这样比较容易对比
 楼主| 发表于 2015-3-13 11:45:27 | 显示全部楼层
这是拉交的数据
forward=&username=fw0at4b&password=fw0at4ba6&confirmpassword=fw0at4ba6&email=27016911@163.com&qq=27016911&checkcode=55453&gender=2&ageyear=1979&agemonth=2&ageday=18&marrystatus=2&education=6&salary=2&height=157&provinceid=177&cityid=189&agree=true

 楼主| 发表于 2015-3-13 13:21:58 | 显示全部楼层
GET http://www.abanyou.cn/index.php? ... 9=&rnd=D8C3FSHN HTTP/1.1
Host: www.abanyou.cn
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
Referer: http://www.abanyou.cn/index.php?c=passport&a=reg
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: PHPSESSID=918d1e6dff03fe48eb837c52e3892f0e; bdshare_firstime=1426172385227; CNZZDATA5174332=cnzz_eid%3D1010320528-1426167846-%26ntime%3D1426213155; Hm_lvt_9807070b85331aba5c2c61eeb04e8207=1426172386; Hm_lpvt_9807070b85331aba5c2c61eeb04e8207=1426217946
发表于 2015-3-13 13:53:42 | 显示全部楼层
Header里面加上X-Requested-With: XMLHttpRequest
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-5-23 12:48

© 2014-2021

快速回复 返回顶部 返回列表