2016-08-17 101 views
0

我想登录到网站与我的帐户,但用vb.net“HttpWebRequest的” 这是标题:如何使用HttpWebRequest的登录到网站在vb.net

http://www.alexasurfing.com/login?task=user.login 

POST /login?task=user.login HTTP/1.1 
Host: www.alexasurfing.com 
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0 
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 
Accept-Language: en-US,en;q=0.5 
Accept-Encoding: gzip, deflate 
Referer: http://www.alexasurfing.com/login 
Cookie: __cfduid=d09a17b9b5acf54646546541471462027; refid=14786; 
Connection: keep-alive 
Content-Type: application/x-www-form-urlencoded 
Content-Length: 159 
username=GMAL%40gmail.com&password=PASWW&remember=yes 
HTTP/1.1 303 See other 
Date: Wed, 17 Aug 2016 19:30:48 GMT 
Content-Type: text/html; charset=utf-8 
Transfer-Encoding: chunked 
Connection: keep-alive 
X-Powered-By: PHP/5.5.9-1ubuntu4.17 
Location: /dashboard/profile 
Server: cloudflare-nginx 

我不知道如何使用httpwebrequest用我的账户登录到网站?

回答

0

在这里看到的例子:

HTTP request with post

您的文章数据是:username=GMAL%40gmail.com&password=PASWW&remember=yes

注意:你是通过HTTP发送明文密码。如果有https选项,您应该使用该选项。