| View previous topic :: View next topic |
| Author |
Message |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Mon Jan 30, 2006 5:03 pm Post subject: Best way to detect internet connection |
|
|
I need a dependible universal way to detect internet connection.
I searched for a couple hours here at the forum and found no resolved way to detect if your connected, as far as anykind of connection detection goes.
Did some one find a good universal way and not post the answer?
Also, I cant locate the vdsinet.dll anywhere, is it the answer?
Thanks so much  |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Mon Jan 30, 2006 5:32 pm Post subject: |
|
|
I forgot to say, I found this line in the search, but cant find the package or zip - etc..
[quote"found in forum search"]Cipper, be sure to use the vdsinet.dll which comes with the VDSDLL28 package. [/quote]
Can some one tell me anything about this DLL?
Thanks... |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Jan 31, 2006 12:50 am Post subject: |
|
|
i found an online.dll at vdsworld that works under xp for dial up ... i am not sure about universal, you will need to check or ask the author of the dll which is pgware in this case
serge _________________
|
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Tue Jan 31, 2006 4:43 am Post subject: |
|
|
That dll does not support dialup connections, unfortunately. I really don't think its possible to detect a connection reliably in vds without actually trying to seek a resource - for instance loading a webpage and seeing if it loads with vdsipp or any other internet dll.
That webpage would definately also have to return realtime data. You could use a php or other dynamic web scripting language which would return data such as a datetime stamp. The reason for this is because some local networks cache data and could very well be sending cached data rather then fresh data if the network was connected to the internet. With a datetime stamp you could detect if the data was current or cached.
However by seeing a resource on the internet you will trigger the firewall on the network. As long as your customers know your app connects to the net this should not be an issue. |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Jan 31, 2006 7:55 am Post subject: |
|
|
| Quote: | | That dll does not support dialup connections, unfortunately. |
interesting, it works fine on my desktop running xp home edition and logged in as a peasant, and on my laptop running xp pro logged in as admin
both use dial up
serge _________________
|
|
| Back to top |
|
 |
JRoza Contributor


Joined: 17 Aug 2003 Posts: 182 Location: Netherlands
|
Posted: Tue Jan 31, 2006 11:58 am Post subject: |
|
|
Some time ago I made a liitle program to check if the internet connection on my server was still alive.
Because the usb connection to the modem somtimes gave problems the program restarts Windows when no live internet connection is found after which the usb- and internet coneection were mostly okay again.
I have to check this evening which dll I used, but I did it via a different route:
On the server resides a small textfile, the testprogram tries to download this file every x-time and compares the content to make sure the download worked. If the content is what I expected all is well if not the reboot is executed.
It's a simple way but it's effective and my server now is never down for more than 10 minutes.
Earlier I tried to solve the problem by pinging several servers but I found that method not trustworthy enough.
The download solution works well.
Jan |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Wed Feb 01, 2006 1:37 am Post subject: |
|
|
Serge you may be correct, however try the dll out on a non NT based machine and it probably won't work. I remember there being a topic about problems with the dll and dialup after it was released  |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Feb 01, 2006 1:43 am Post subject: |
|
|
fair enough
i am glad that it works for me
serge _________________
|
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Wed Feb 01, 2006 1:49 am Post subject: |
|
|
wow, what a crowd
Be nice if we could find a good universal DLL or simular.
I found a way on my XP pro with 56k dialup that will do me for now.
Wasn't sure if it was safe to show my numbers, so some are asterisk.
But I bet there the same on every dialup when offline.
Anyways the below number stays the same when offline, so I just compare with the IF statment below (been working great so far here).
IP for dialup(static) allways produces a new IP number for online.
Dreadnet DLL gets the IP address number to process.
(sloppy Example below - it wont run like tha - but you get the idea)
| Code: | %%result = @Dnet(GetIP)
IF @equal(%%result,***.0.0.*)
info your offline or local
ELSE
info online
END |
Don't know for sure if anyone else could use it that way.
Thank you very much, all of you - appreciate |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Wed Feb 01, 2006 8:06 am Post subject: |
|
|
My guess is that your masked IP is 127.0.0.1 - standard local IP.
But you cannot use just the IP address to safely check if ya're connected to the Internet. If you are
on a local network, you'll most likely have a DHCP server that gives you an IP, connected to the
Internet or not.
So if you wanna check your connectivity, the only way I have been able to find is to connect
to some resource on the Internet like it's been said above.
This might be an option:
| Code: |
LOADLIB WININET.DLL
%%url = "http://checkip.dyndns.org/"
if @lib(WININET,InternetCheckConnectionA,bool:,STR:%%url,INT:1,INT:0)
Info Connected!
end
FREELIB WININET.DLL
|
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Thu Feb 02, 2006 7:20 pm Post subject: |
|
|
Dread knows his internet
Thanks Dread for clearing that up for me in the clearist fashion.
Would it be hard to create a little post box on my paid webpage like this one we're typing now with the scroll down bar on right? (like a tiny forum window).
So people could read what others typed, like a tiny chat box - but not 2 way chat (just one at a time could leave message) and only want to be able to clear it at times - nothing fancy(maybe a password), and install it to one of my HTML page's.
Would that be a major job, or should I just install a PHP2 demo on my sight.
I thought it would be cool to have for those times people want to leave a quick message without waiting for there dialup to load a PHP forum page - etc..
I allways want too much
Thanks |
|
| Back to top |
|
 |
|