Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Is it possible to detect wether you are connected to the internet or not

Author
Message
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 01:37
(I am asking if you can detect being connected to the internet, not if you can detect being conected to another computer) [img][/img]
>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 3rd Aug 2003 02:28
of course it is

the artist formally known as darkfluff
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 02:42
Thankyou

Now would sombody like to tell me how

>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
Jimmy Cool
23
Years of Service
User Offline
Joined: 6th Mar 2003
Location: United States
Posted: 3rd Aug 2003 02:46
open a web browser, go to google.com, if it loads, you're on the internet

***********************************************
Me, i'll just be here crying my brains out
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 03:08
lol ok ok
enough with the jokes
I meant is there a command in dbpro which returns a value of 1 if you are connected to the internet

>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Aug 2003 03:10
There's no built-in command that will do this for you, but I do believe that there is a way you can do it with windows DLL's ... now I just have to remember where I saw it ...
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 03:13
*twidles thums*


>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Aug 2003 03:48
They mentioned it on the other site actually...


Logo design by Indi
Its better than a poke in the eye...
Eddie Gordo
23
Years of Service
User Offline
Joined: 14th Jan 2003
Location: Ohio - USA
Posted: 3rd Aug 2003 07:37
just try to connect to an FTP server an if it fails you either didnt have the right password or its not online, i believe that you can get a string of the error for this command...

Visual Programming Studio ORANGE
Replacement IDE for Dark Basic Professional...
(Will Be Availeable When This is Removed)
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 3rd Aug 2003 13:25 Edited at: 3rd Aug 2003 13:26
yup ED's got the right idea. thats what most games do.

And o yes, BO SELECTA

the artist formally known as darkfluff
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Aug 2003 14:19
The answer to the original question is ... almost.

It turns out that the best you can do is check for a valid network connection. So you can check for that, then attempt to ftp the outside-world for a complete check.

Here are two pieces of code I've pasted together. Check each one out, and see which you get the best results from.
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 14:47
cheers

Quote: "And o HELLO DO! im mell b! better known as scarey spice RAAAAAAAAARRRRRRRR ye compleat self b******* ye!"

Bo Selecta!

>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 14:47 Edited at: 3rd Aug 2003 14:49
whoops double click

>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 14:54
um where does one start and the other end

>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 14:57
aha um
whats the diference between being online and being connected

>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Aug 2003 15:00
Being on-line is where you are connected to the ISP
Being connnect means your actually using the internet.

Could have those the wrong way around though...


Logo design by Indi
Its better than a poke in the eye...
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Aug 2003 15:28
Your best bet is to try them out ... I have all sorts of network connections, and I don't use dial-up so it's hard for me to test this properly.
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 15:55
hmm
if i want to use the ftp commands do i have to be online or connected or both. which one is essensial. I just turned on aol didnt visit any pages (except the annoying front page that appears) and the program said it was both online and conencted. I want to use ftp in my program and multiplayer commands. which of these statuses need to be on to use BOTH ftp and multiplayer commands.

>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Aug 2003 16:26
Disconnect, then try it again. Whichever one says that you aren't connected/online is the one you want.
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 3rd Aug 2003 17:04 Edited at: 3rd Aug 2003 17:05
OK
im on a 56k aol connection That says it all

When Aol was either closed or running but NOT connected i got:

ONLINE
NOT CONNECTED

When Aol was connected (able to brows the net) i got:

ONLINE
CONNECTED

so it seems the only one that's worth using is the second one which uses the Wininet.dll

Heres the final source to decide wether or not you can exchange packets and view web pages (connected or not)




>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!
Shock
AGK Developer
23
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 4th Aug 2003 00:12
how about

PERFORM CHECKLIST FOR NET CONNECTIONS

? What does that do? lol

Sticking feathers up your butt doesn't make you a chicken.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Aug 2003 00:14
It tells you what is available, not what is active.

So dial-up TCP/IP is available even if you're not connected...
Shock
AGK Developer
23
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 4th Aug 2003 00:25
ah, i see. i think my next project might be multiplayer, so i can learn what the commands are.

Sticking feathers up your butt doesn't make you a chicken.
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 4th Aug 2003 00:32
well my program so far works thanks to all this connection code and ftp stuff...um apart from the slight bugs with one of them...when are these bugs going to be fixed anyway...when is patch 5 planned for release. are they all to be released for patch 5. bugs going to be fixed and diferent beta versions released. or will we have to wait for full version.

>>TerraByte. Putting the Byte back into Terragramming<<
Bo Selecta!

Login to post a reply

Server time is: 2026-07-23 00:36:39
Your offset time is: 2026-07-23 00:36:39