January 16, 2021, 06:14:03 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bb] is online? by Airilsm [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] is online? by Airilsm [ 1+ years ago ] (Read 534 times)
BlitzBot
Jr. Member
Posts: 1
[bb] is online? by Airilsm [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:39 AM »
Title :
is online?
Author :
Airilsm
Posted :
1+ years ago
Description :
My simple way to check user online without annoing 'Network Connection Popup'. May be not working correctlly on network computer
Code :
Code: BlitzBasic
If
OnLine
(
)
Print
"You're online"
Else
Print
"You're not online"
WaitKey
(
)
End
Function
OnLine
(
)
n =
CountHostIPs
(
""
)
For
k=
1
To
n
ip =
HostIP
(
k
)
ipaddress$ =
DottedIP
$
(
ip
)
If
ipaddress$=
"127.0.0.1"
notconnect=
1
EndIf
Next
Return
Not
(
notconnect
)
End Function
Comments :
*(Posted 1+ years ago)
the only question I have with this, is does it still tell you if you are online on the internet or just connected to a network?
Pineapple(Posted 1+ years ago)
Yeah, personally, I'd use a function that sends a request to a few servers (microsoft.com, google.com, yahoo.com) if at least one responds, then your online, if not, well, chances are your not! :)Anyway, that's me, but I'm sure someone will have a use for the above! ;)Dabz
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bb] is online? by Airilsm [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal