Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Sending information to a web server using VB (How...)


Message #1 by "Fred Bloggs" <matt.trinder@p...> on Tue, 26 Nov 2002 16:52:35
Thanks, I will investigate this
Matt

----- Original Message ----- 
From: <gjp@i...>
To: "professional vb" <pro_vb@p...>
Sent: Tuesday, November 26, 2002 7:15 PM
Subject: [pro_vb] Re: Sending information to a web server using VB (How...)


> Yes, very easily...use the XMLHttp object which is part of MSXML.  All 
> you need do is build the name/value pairs being submitted via the form 
> and "send".  Copied from Microsoft's knowledge base:
> 
> DataToSend = "id=1"
> dim xmlhttp 
> set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
> xmlhttp.Open "POST","http://localhost/Receiver.asp",false
> xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-
> urlencoded"
> xmlhttp.send DataToSend
> Response.ContentType = "text/xml"
> Response.Write xmlhttp.responsexml.xml
>         Set xmlhttp = nothing
> 
> 
> http://support.microsoft.com/default.aspx?scid=KB;en-us;q290591
> http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=170
> 
> -----Original Message-----
> From: "Fred Bloggs" <matt.trinder@p...>
> To: "professional vb" <pro_vb@p...>
> Date: Tue, 26 Nov 2002 16:52:35
> Subject: [pro_vb] Sending information to a web server using VB  (How...)
> 
> > Hi All
> > 
> > Can anybody help me with the following.
> > 
> > What I want to do is to be able to send information to a web server
> > using 
> > VB.  The information is normally in forms in web pages provided by the
> > web 
> > server.
> > 
> > The scenario is as follows - Internet Bookmaker (Sportsbook for those
> > of 
> > you in the USA !) - normally you have to click on the various buttons, 
> > enter the amount of your bet etc, and click a submit button.
> > 
> > I have already built a tool that downloads the prices from the various 
> > bookies and compares the prices, but at the moment I have to manually
> > run 
> > IE, navigate to the various sites and pages, by which time the prices I
> > am 
> > after have ususally gone.
> > 
> > I would like to automate the bet placing process.  One way seems to be 
> > using a WebBrowser control on a VB form, and automating it using the
> > DHTML 
> > methods and events, but it seems very long winded and awkward.
> > 
> > Is there any way I can build a representation of the forms and data in 
> > memory in VB, and submit it back to the site without having to automate
> > a 
> > visual control.
> > 
> > Any and all ideas gratefully recieved.
> > 
> > Cheers
> > 
> > Matt
> > 
> 
> 


  Return to Index