var url = "http://google.nl:80";
ping.ping(
url,
100,
function(message) // message is 0 or 1
{
if(0 == parseInt(message))
{
console.log("Url is not reachable");
}
else if(1 == parseInt(message))
{
console.log("Url pinged successfully");
}
},
function(err)
{
console.log(err);
}
);
jrice3rt / cordova-ping Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ryuken/cordova-ping
A ping plugin for cordova/phonegap
License: MIT License