[C#] 纯文本查看 复制代码
public void LiePin_Login3()
{
try
{
string url = "";
HttpItem item = new HttpItem();
http = new HttpHelper();
HttpResult httpresult;
CookieCollection cookieCollection = new CookieCollection();
url = "http://statistic.liepin.com/statVisit.do?site=1&userId=0&userKind=0&url=http%3A%2F%2Fwww.liepin.com%2F&resolution=1280x800&h=11&m=29&s=57&cookie=1&ref=&puuid=14541245912813477200659&stay_time=6000&rand=0.9467251336221421";
item = new HttpItem()
{
URL = url,
Method = "GET",
Referer = "http://www.liepin.com/",
UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)",
CookieCollection = cookieCollection,
ResultCookieType = ResultCookieType.CookieCollection
};
httpresult = http.GetHtml(item);
cookieCollection = httpresult.CookieCollection;
url = "http://www.liepin.com/image/randomcode/";
item = new HttpItem()
{
URL = url,
Method = "GET",
Referer = "http://www.liepin.com/",
UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)",
CookieCollection = cookieCollection,
ResultCookieType = ResultCookieType.CookieCollection
};
httpresult = http.GetHtml(item);
cookieCollection = httpresult.CookieCollection;
Cookie cookie = new Cookie("_fecdn_", "1", "/", ".liepin.com");
cookieCollection.Add(cookie);
cookie = new Cookie("__session_seq", "2", "/", ".liepin.com");
cookieCollection.Add(cookie);
cookie = new Cookie("_mscid", "00000000", "/", ".liepin.com");
cookieCollection.Add(cookie);
cookie = new Cookie("_ltu", "%7B%22level%22%3A3%2C%22goldcard%22%3Afalse%2C%22id%22%3A%2227175691%22%2C%22v%22%3A%221.1%22%7D", "/", ".liepin.com");
cookieCollection.Add(cookie);
cookie = new Cookie("gr_user_id", "7b081cd2-1cae-45e2-b84b-dbb5c4ff26d0", "/", ".liepin.com");
cookieCollection.Add(cookie);
cookie = new Cookie("gr_session_id", "c3caabdc-4285-47ee-b090-fd394ab1092e", "/", ".liepin.com");
cookieCollection.Add(cookie);
url = "http://www.liepin.com/user/ajaxlogin.json";
string postData = "user_kind=0&isMd5=1&layer_from=wwwindex_top_cover_login_userc&user_login=jianjinke%40163.com&user_pwd=4b122bcfedf844086658d4357368e5ed&chk_remember_pwd=on";
item = new HttpItem()
{
URL = url,
Method = "POST",
ContentType = "application/x-www-form-urlencoded",
Accept = "application/json, text/javascript, */*; q=0.01",
Postdata = postData,
Referer = "http://www.liepin.com/",
UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)",
CookieCollection = cookieCollection,
ResultCookieType = ResultCookieType.CookieCollection
};
httpresult = http.GetHtml(item);
cookieCollection = httpresult.CookieCollection;
}
catch (Exception ex)
{
TraceLog.PrintLn(ex.Message);
}
}
public void LiePin_Login2()
{
try
{
string url = "";
HttpItem item = new HttpItem();
http = new HttpHelper();
HttpResult httpresult;
CookieCollection cookieCollection = new CookieCollection();
url = "http://statistic.liepin.com/statVisit.do?site=1&userId=0&userKind=0&url=http%3A%2F%2Fwww.liepin.com%2F&resolution=1280x800&h=11&m=29&s=57&cookie=1&ref=&puuid=14541245912813477200659&stay_time=6000&rand=0.9467251336221421";
item = new HttpItem()
{
URL = url,
Method = "GET",
Referer = "http://www.liepin.com/",
UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)",
CookieCollection = cookieCollection,
ResultCookieType = ResultCookieType.CookieCollection
};
httpresult = http.GetHtml(item);
cookieCollection = httpresult.CookieCollection ;
url = "http://www.liepin.com/image/randomcode/";
item = new HttpItem()
{
URL = url,
Method = "GET",
Referer = "http://www.liepin.com/",
UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)",
CookieCollection = cookieCollection,
ResultCookieType = ResultCookieType.CookieCollection
};
httpresult = http.GetHtml(item);
cookieCollection = httpresult.CookieCollection;
url = "http://www.liepin.com/user/ajaxlogin.json";
string postData = "user_kind=0&isMd5=1&layer_from=wwwindex_top_cover_login_userc&user_login=jianjinke%40163.com&user_pwd=4b122bcfedf844086658d4357368e5ed&chk_remember_pwd=on";
item = new HttpItem()
{
URL = url,
Method = "POST",
ContentType = "application/x-www-form-urlencoded",
Accept = "application/json, text/javascript, */*; q=0.01",
Postdata = postData,
Referer = "http://www.liepin.com/",
UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)",
CookieCollection = cookieCollection,
ResultCookieType = ResultCookieType.CookieCollection
};
httpresult = http.GetHtml(item);
cookieCollection = httpresult.CookieCollection;
}
catch (Exception ex)
{
TraceLog.PrintLn (ex.Message);
}
}
public void LiePin_Login1()
{
try
{
string url = "";
HttpItem item = new HttpItem();
http = new HttpHelper();
HttpResult httpresult;
CookieCollection cookieCollection = new CookieCollection();
Cookie cookie = new Cookie("__tlog", PubFun.getTimeTicks1() + ".57%7C00000000%7C00000000%7C00000000%7C00000000", "/", ".liepin.com");
cookieCollection.Add(cookie);
cookie = new Cookie("__session_seq", "2", "/", ".liepin.com");
cookieCollection.Add(cookie);
cookie = new Cookie("_mscid", "00000000", "/", ".liepin.com");
cookieCollection.Add(cookie);
cookie = new Cookie("_ltu", "%7B%22level%22%3A3%2C%22goldcard%22%3Afalse%2C%22id%22%3A%2227175691%22%2C%22v%22%3A%221.1%22%7D", "/", ".liepin.com");
cookieCollection.Add(cookie);
url = "http://www.liepin.com/webUser/login4c.json";
string postData = "user_login=jianjinke%40163.com&user_pwd=4b122bcfedf844086658d4357368e5ed&chk_remember_pwd=on";
item = new HttpItem()
{
URL = url,
Method = "POST",
ContentType = "application/x-www-form-urlencoded",
Accept = "application/json, text/javascript, */*; q=0.01",
Postdata = postData,
Referer = "http://www.liepin.com/user/login/?user_login=",
UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)",
CookieCollection = cookieCollection,
ResultCookieType = ResultCookieType.CookieCollection
};
httpresult = http.GetHtml(item);
Cookies = httpresult.Cookie;
}
catch (Exception ex)
{
TraceLog.PrintLn (ex.Message );
}
}