General area when it fits no where else

Moderator: Mmiscool

User avatar
By Joaquim Boavida
#66600 Hi,

Basically I query google.com, and if I got an empty string it means that i'm not connected to the internet (or google is down :lol: ) then reconnect

Code: Select all
if wget("www.google.com") == "" then
     gosub [reconnect]
....

[reconnect]
dim c_inf(2) as string
c_inf(1) = read("WIFIname")
c_inf(2) = read("WIFIpass")
wifi.connect(c_inf(1),c_inf(2))
undim c_inf
return



Not sure if is the best method..