[C#] 纯文本查看 复制代码 public static string getcookie()
{
string cookie;
HttpWebRequest http = (HttpWebRequest)WebRequest.Create("http://www.zhoucheng.co/admin.php?model=login");
http.Method = "GET";
HttpWebResponse http1 = (HttpWebResponse)http.GetResponse();
cookie = http1.Headers["Set-Cookie"];
return cookie;
}
//HttpItem item = new HttpItem()
//{
// URL = "http://www.zhoucheng.co/admin.php?model=login",
// Method="get",
//};
//HttpResult denglu = http.GetHtml(item);
//cookie = denglu.Cookie;
上边获取的cookie跟下边框架获取的怎么不一样呢 用你的可以登录 用上边的登录不了
|