Winsock doesn't render images unlike webbrowser, saving bandwith. Just one of the many bonuses. However, i could use inet but I'm not sure completely sure if it supports such as storing cookies for each individual component.
I'm not sure if that made sense or not. -Andrew On Jul 10, 9:04 am, Peter Smith <[email protected]> wrote: > Probably no replies because the question is rather vague, and nobody's > had the time or desire to sit down and take you through a > self-discovery process to teach you to write less vague questions, or > even just make assumptions...though, the latter tends to be rather > ego-damaging and avoided by many. There's another reason, too, but > we'll get to that one at the end of this. :) > > Me, I've got plenty of ego to spare, so I'll make some assumptions. :) > > So, you sit down at your computer, log in to Windows, and there's a > single icon on the screen. You click it, and a message box pops up > 'You have logged into the SlashDot Forums', where I'm assuming > x='SlashDot'. I'm not sure how you'd log into a script, so I'll ignore > that part. > > Inside the box is code in VB 2008 that 1) usesWinsock, and 2) > actually connects to a remote site and transmits data such that it's > not just faking the login. Not really sure if you want to do anything > ELSE after logging in, so, we'll assume you just want to log in, and > be done with it. Perhaps it's a forum where if you don't log in every > day, you lose status. (like logging into the Where's George site > refreshes your score). > > At this point, I'd normally just stop, because I avoid VB, being an > adult and all. But, okay, so you want/need/have to use VB 2008. What > other assumptions will I make? Oh, let's assume that the forum you > want to connect to is web-based; I'm guessing most people wouldn't be > logging into a mail server, or software on their system, or an old BBS > type system. So, you've figured out a URL that gives you the login > page. > > At this point, I go to a search engine (let's choose Dogpile.com) and > type: "VB 2008winsocklogging into website". This looks > promising:http://www.bigresource.com/VB-Winsock-Syntax-To-request-a-website-wit... > as > doeshttp://www.computing.net/answers/programming/winsock-post-help-visual... > > Lots of people asking lots ofwinsockquestions. But... > > WHY do you want to useWinsock? If we take 'winsock' out of the > equation, we get really nice answers, > likehttp://www.dreamincode.net/forums/showtopic79876.htm(with code below) > using... hey, using .NET stuff! And that's what *this* is, a .NET > Development area.... > > (add a webbrowser to your form) > Webbrowser1.Navigate("www.yourhomepage.com/input.php") > > If Webbrowser1.ReadyState = WebBrowserReadyState.Complete > webBrowser1.Document.All("txtUsername").SetAttribute("value", > "Username") > webBrowser1.Document.All("txtPassword").SetAttribute("value", > "mypass01") > ' This fills the controls with your values > ' But you need the name of the Control for the parameter > ..Document.all(name of the control)... > > webBrowser1.Document.Forms(0).InvokeMember("submit") > 'This calls the submit > > And THERE'S the crux of the answer.Winsockprogramming is NOT .NET > programming. It's 'we don't HAVE .NET' programming. In fact, > there'shttp://www.astahost.com/info.php/Write-Code-Winsock-Net_t9819.html > which is the sort of thing you found System.Net.TCPIP in. But you have > no need to use it, if you're just trying to access web hosts.
