Results 1 to 5 of 5

Thread: [2008] Connected to Internet?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2007
    Posts
    167

    [2008] Connected to Internet?

    How can I check if Im connected to the internet?
    (I may be connected through a modem, LAN, wireless...)
    thanks

  2. #2
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [2008] Connected to Internet?

    Try pinging a site like google.

    http://msdn2.microsoft.com/en-us/lib...tion.ping.aspx

    Also, a lot of other topics have been made recently asking this. You can also view those for related solutions.

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: [2008] Connected to Internet?

    You attempt to connect to a remote server. A response of "no route to host / host unreachable" usuallysignifies no connection. The System.Net.Sockets namespace contains all you need.

    Why do you want to determine weather there is an Internet connection? If you are going to attempt to make a connection to a remote service it is best to do it all in one go.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: [2008] Connected to Internet?

    have a look at this

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: [2008] Connected to Internet?

    I have never been one to recommend pinging a site like google to check for a connection. Simply because; if the application is installed on 500 machines (i.e: easily possible in a corporate environment). The requests would soon get blocked when all of them attempt to ping at once.

    Create you own server if you want to do this.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width