forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


connected to the internet
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Fri Apr 19, 2002 1:26 pm    Post subject: Reply with quote

I don't think any solution that checks for public and private IPs will work. I am pretty sure that most users that are on a network will have only 1 IP address. The router controlls the public data flow to the internal network and has the only public IP on most networks. You may be able to check the to see if the Gateway is a puiblic IP but even that would be unreliable beacause you can route through private IPs also.

Using any form of ping will rarely work. Many network administrators will not allow internal users to ping (I initially used serveral flavors of ping). The "Ping of Death" virus reaked havoc on many networks so even many web servers can no longer be pinged, try and ping microsoft.com and see what happens.

I believe the only reliable method is to:
a)determine what your app needs to check for. (ie: web pages, mail, FTP etc.)
b) Test that protocol(s) or port using a known public reference point like microsoft or Yahoo.

The example I posted earlier in this thread has been in use for over a year by serveral hundred users. It works reliably to test for access to web pages. If someone has a better way I'd love to hear it, my main application is very dependant on the internet and uses mail, FTP and HTTP.

moke
Back to top
View user's profile Send private message Send e-mail
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Fri Apr 19, 2002 11:49 pm    Post subject: Reply with quote

I too found that the registry entries suggested by mrfloppy weren't there in my registry (running ME) - pity!

I tried the cmdnet.exe file at work (network and permanent ISDN net connection) and found that i got the same IP whether on the net or not (the l switch) and that it was very very slow on the p switch when not connected to the net.

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Sat Apr 20, 2002 12:16 am    Post subject: Reply with quote

Serge wrote:
I tried the cmdnet.exe file at work (network and permanent ISDN net connection) and found that i got the same IP whether on the net or not (the l switch) and that it was very very slow on the p switch when not connected to the net.Serge


That makes sense. With the -l switch cmdnet will show the computer's own IP address, and if it is on a
TCP/IP network it will have one (and the same) no matter if it is connected to the Internet
or not. This works exactly like PGWARE's vdsonline dll.
And yes, it will be slow on the -p routine because it obviously has to make a call to a web
server to obtain the public IP which will be the one with which your router connects to the outside
world. If not connected, the program cannot connect to the web server and then times out after
a number of seconds.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group