in reply to Efficiently check internet connection?
If it was me at the keyboard I'd just ping google or something.
Do that from within the script ;-)