RizbIT
Member
Code:
/*
Internet Connected Script
By RizbIT, UK
http://Rizbit.uk
This script is a rather simple approach to check if your device or PC is connected to the internet.
It seems to work on all the devices i tested it on. Android, PC, Windows Phone etc..
It will return true if internet connection present or false if non present
It does this by trying to resolve the IP address of a website. So if it cant we "assume" that
there is no internet connection. We use Google as its more likely to be working compared to other
sites, thus prevents us from getting false results.
*/
if !string_count(".",string(network_resolve("www.google.com")))
return false
else
return true