本帖最后由 lxb371855986 于 2015-8-1 23:59 编辑
以前的接口https://auth.alipay.com/login/verifyId.json死了
目前有人在用这个接口https://memberprod.alipay.com/ac ... atusCheckEmail.json
https://memberprod.alipay.com/account/reg/email.htm 这个页面抓包
抓包的时候,返回结果为
{"jsonToken":"f4bbkY9dHfCOOmI3gzu9A8T3GynH0hDx","stat":"ok","info":{"accType":"0","logonType":"EMAIL","accStatus":"available","accName":"dafdafdafda@qq.com"}}不存在 可以注册
{"jsonToken":"TNIuIWf6SUK4DUAcdymQxEHjWYc8paXd","stat":"ok","info":{"accType":"2","logonType":"EMAIL","accStatus":"login","accName":"123456789@qq.com","country":"CN"}}已经注册
[C#] 纯文本查看 复制代码 public static string Alipay_Check(string _Cookie,string _Postdata)
{
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "https://memberprod.alipay.com/account/reg/acctStatusCheckEmail.json", //URL 必需项
Method = "POST",//URL 可选项 默认为Get
IsToLower = false,//得到的HTML代码是否转成小写 可选项默认转小写
Cookie = _Cookie,//字符串Cookie 可选项
Referer = "https://memberprod.alipay.com/account/reg/email.htm",//来源URL 可选项
Postdata = _Postdata,//Post数据 可选项GET时不需要写
Timeout = 100000,//连接超时时间 可选项默认为100000
ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000
UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)",//用户的浏览器类型,版本,操作系统 可选项有默认值
ContentType = "application/x-www-form-urlencoded; charset=UTF-8",//返回类型 可选项有默认值
Allowautoredirect = false,//是否根据301跳转 可选项
ResultType = ResultType.String
};
HttpResult result = http.GetHtml(item);
string html = result.Html.Trim();
return html;
}
_Cookie和_Postdata值是抓包来的
Cookie: JSESSIONID=AB1F4388593C0F98DEEE93BFA109A5E5; spanner=nSVXMOgkfQQuVEZhyKTeGbjjG2M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vmK%2BZbliv%2BQ5JPniP6G%2FJPrl%2FiC
%2BpXhleKN%2BZbqnvGH%2B5Tsg%2FeB7pjhjvtb
但实际上我html什么也获取不到,返回空
|