Hi,
I am trying to use my vb.net app as a replacement to a normal browser
to interface with a website.
I am trying to achieve 2 things:
1) logon to the website
2) complete forms and submit data to the website (would I need to store
cookies once I have logged on?)
I've looked at various webrequest, POST resources without any luck. The
logic behind what I need to do seems straightforward , but I'm finding
this really hard applying it to code.
The post data details are as follows:
1) for logon:
Mime type : application/x-www-form-urlencoded
languageSelecto r : en%2CGBR
username : xxxxx
password : xxxxxxx
LoginBTN :Login
Request Header Name Request Header Value
POST /account/login/LoginAction.do HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer: http://www.betfair.com/Header.do
Accept-Language: en-gb
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322)
Host: www.betfair.com
Content-Length: 93
Connection: Keep-Alive
Cache-Control: no-cache
Cookie:
2) for sending form info:
Mime Type : application/x-www-form-urlencoded
BetIDs :
origin : placeBets
SelectionIDs :5861|5862|
BidTypes :B|B|
Odds :1000|1000|
NewOdds :
Stakes :2|2|
NewStakes :
Modes :
SubEventIds :
BetType :O
ei :3337261
iid :GreyHound
fa :pb
iCard :
placeBets_oddsL ayProfitLiabili ty : Liability
Request Header Name Request Header Value
POST /betting/BetsManipulatio nAction.do HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer:
http://www.betfair.com/betting/Marke...570&origin=NHR
Accept-Language: en-gb
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322)
Host: www.betfair.com
Content-Length: 237
Connection: Keep-Alive
Cache-Control: no-cache
Cookie:
I believe this is all the information I need to be able to do this, but
as I said, knowing where to start is a nightmare :-)
Any help, in particular code examples would be hugely appreciated.
Many thanks,
Mike