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 


Best way to detect internet connection

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Mon Jan 30, 2006 5:03 pm    Post subject: Best way to detect internet connection Reply with quote

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 Cool
Back to top
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Mon Jan 30, 2006 5:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Jan 31, 2006 12:50 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Tue Jan 31, 2006 4:43 am    Post subject: Reply with quote

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
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Jan 31, 2006 7:55 am    Post subject: Reply with quote

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 Very Happy Very Happy Very Happy

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
JRoza
Contributor
Contributor


Joined: 17 Aug 2003
Posts: 182
Location: Netherlands

PostPosted: Tue Jan 31, 2006 11:58 am    Post subject: Reply with quote

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.

Very Happy
Jan
Back to top
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Wed Feb 01, 2006 1:37 am    Post subject: Reply with quote

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 Sad
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Wed Feb 01, 2006 1:43 am    Post subject: Reply with quote

fair enough Smile

i am glad that it works for me Smile

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Wed Feb 01, 2006 1:49 am    Post subject: Reply with quote

wow, what a crowd Embarassed

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
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


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

PostPosted: Wed Feb 01, 2006 8:06 am    Post subject: Reply with quote

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
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Thu Feb 02, 2006 7:20 pm    Post subject: Reply with quote

Dread knows his internet Very Happy

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 Laughing
Thanks
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
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