Re: Detecting a internet connection
- Posted by Greg Harris <blackdog at CDC.NET> Aug 02, 1998
- 533 views
Thanks to all who answered, -----Original Message----- From: Hawke <mdeland at NWINFO.NET> To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU> Date: Sunday, August 02, 1998 9:22 PM Subject: Re: Detecting a internet connection >>Does anyone how how to detect if a internet connection has been >established via a dial-up? How do you detect if it has been >disconnected? >>Greg Harris >>jeffery replied win95 autodetects...... True, mine does the same thing. But it tried to dail out when I don't want it too. ICQ has a net detection feature so that it can be loaded up when Windows starts, but it doesn't try to connect to the server unless a dail-up session is present. >i'm not so sure that would be always reliable... >if it is reliable, cool... >if not, i may have another solution... >ping.exe >it comes default on most win95 installs, just like >telnet.exe.... >you could use system() combined with ping, pipe it >to an output file, and dissect the output file looking >for "destination not reachable"... what to ping tho? >the users Internet Service Provider... if that doesn't >ping then you can pretty much assume they -arent- online. >at first i was thinking about pinging some 'big' place >that is -ahem- "always" working...no such place... >the ISP is almost goof proof tho... >here's the catch: >proxies... >myself? i'm on a proxy thru another machine and then onto >the net, so ping doesnt do anything but ping the proxy >which may or may not be online... cant (so far) break >out of the proxy to "ping-thru" to the real host i want >to ping... and since *I* am the network administrator, :) >and me and myself have already talked about the proxy issue, >there is so far no solution... now the proxy machine can >ping anywhere it wants... so if i need pinging, i ask my >wife (the system adminstrator here) :) to ping from her machine >and that solves that without my catching migraines trying >to fix something here that really doesnt need fixing... >hope this helps--Hawke' Thanks. Where I work in my mundane job, I can't get out of the firewall but I can resolve hostnames. You can check the IP address (should be 0.0.0.0) if not connected, but on a network I have a IP address. So that blows that one. However if the IP address is 0.0.0.0 it should reflect a dialup user right? Thanks for the help. Greg Harris