|
楼主 |
发表于 2014-9-23 20:15:22
|
显示全部楼层
本帖最后由 庸亼臫扰]。 于 2014-9-23 20:30 编辑
膜拜中....! 站长好啊, 对接怎么下手啊, cookie 遍历,更新? 可以给些代码吗? 完全没头绪,
第三步获取到的cookie
JSESSIONID=mCq7JhhGCm3HKPhLhGytvZZpxfYQ1Vdxv63QL7mrG8d72DvGX9zn!670049526; path=/; HttpOnly
前面的cookie
userName=e0604009028;JSESSIONID=FgQMJhhdQMP4qJjR2DzhGm1X3pJbyTrdpZVT1pTs5nyzpDdspDRh!670049526; path=/; HttpOnly,AD_RS_COOKIE=20080912; expires=Wed, 24-Sep-2014 12:02:05 GMT; path=/;
怎么对接,
item.Referer = "http://19.16.44.159/login.jsp";
item.URL = "http://19.16.44.159/j_spring_security_check";
item.Method = "post";
item.Cookie = LoginCookie(前面获取到的);
item.Postdata = "type=1&j_username="+LoginuserName+"&j_password="+LoginpassWord+"&j_validationCode="+code;
item.Allowautoredirect = true;
var result = hl.GetHtml(item);
var loginCookie = result.Cookie(当前获取到的) + LoginCookie;
item.Referer = "http://19.16.44.159/";
item.URL = "http://19.16.44.159/main.action";
item.Method = "get";
item.ContentType = "text/html;charset=UTF-8";
item.Cookie = loginCookie;
result = hl.GetHtml(item);
return result.Html;
在线等,好着急
|
|