I just got done reading How can I watch for an active internet connection which is similar to what I need but the responses are too "basic".

I want to detect whether or not my internet connection is active by more reliable means than pinging a list of known web sites and looking for a response. That's a little too basic for what I need. I want it to check for error responses as well (Running Windows 98 through LAN environment through a D-Link router for DSL). I want it to give errors like Windows offers "cable disconnected" to see if anyone disconnected my computer from the LAN while I am away and errors of that type. Are these errors detectable in Perl? Sometimes my LAN just dies (no one knows just why) so that'd be nice to have a custom error for incase all wires are connected and it still doesn't work.

I know it's a long shot but is something of this sort possible? To not just verify whether or not you're connected to the internet or not but check for errors given from the operating system?

I was thinking it might be possible to run this script on my web site via a chron job but would it be possible to detect my specific system on the network if we all share the same IP?



"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid

In reply to checking internet connection by sulfericacid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.