How to logon and post this to a web form

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
languageSelector : 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_oddsLayProfitLiability : Liability

Request Header Name Request Header Value
POST /betting/BetsManipulationAction.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/MarketView.do?mi=3334570&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

.



Relevant Pages

  • Re: Session-specific Auth Cookie
    ... anything in the output that indicates to me that the same cookie is being ... Accept-Language: en-us ... Server: Microsoft-IIS/6.0 ... Cache-Control: private ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: ANA wesbite problem - I need the forums assistance
    ... This request is only allowed to be processed through the ANA website ... You may want to try accessing the money.org dealer directory from a ... Or you may want to try using an alternate Internet Browser. ... Sounds like a cookie problem I had no problems getting on and they left ...
    (rec.collecting.coins)
  • Re: How to logon and post this to a web form
    ... > to interface with a website. ... > Host: www.betfair.com ... > Connection: Keep-Alive ...
    (microsoft.public.dotnet.languages.vb)
  • Re: ANA wesbite problem - I need the forums assistance
    ... > What is so interesting is I was able to access their website after the ... > I've done the cookie cleaning, temp files, history, included all reference ... You may want to try accessing the money.org dealer directory from a ... Or you may want to try using an alternate Internet Browser. ...
    (rec.collecting.coins)
  • Re: Semi OT computer quesion
    ... It sounds like a cookie problem. ... Either reauthenticate yourself to the website (this may simply involve ... responding to an email)or use a newsreader program. ... Despite what some idiots claim, usenet is not a website ...
    (talk.origins)