Check internet status
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Check internet status
Hello, everyone. i need to do the project by live code to check the whether there have the internet connection, and then if have internet, then can update some new informations in , Anyone got any idea? Really confused now.
Re: Check internet status
Hi,
There are several ways to do this. The easiest way is to put a tine file on your server, e.g. with just a "1", and check if you can download this file:
In some cases, I've noticed that rslt would also contain the URL that is being contacted. I guess that is/was a bug. So, you might want to check for this as well:
Kind regards,
Mark
There are several ways to do this. The easiest way is to put a tine file on your server, e.g. with just a "1", and check if you can download this file:
Code: Select all
put url "http://www.yourdomain.xyz/the1.htm" into myStatus
put the result into rslt
if rslt is not empty then
beep
answer error rslt
else if myStatus is 1 then
// do your thing
else
beep
answer error "Sorry, an error occurred."
end if
Code: Select all
if rslt is not empty and not (rslt begins with "http") then
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Check internet status
Hi feelself,
please only ONE thread (in ONE forum) for the same question!
I deleted all other threads with your question!
Best
Klaus
please only ONE thread (in ONE forum) for the same question!
I deleted all other threads with your question!
Best
Klaus