hungrypinkpig Posted June 21, 2010 Share Posted June 21, 2010 I need a script that can Ping and IP (With an port) And return results. if ping is -1, Server offline. if ping is !-1, Server online. I just need somthing that can ping it, and return wether its online or not. Quote Link to comment https://forums.phpfreaks.com/topic/205379-simple-ping-script/ Share on other sites More sharing options...
Alex Posted June 21, 2010 Share Posted June 21, 2010 http://www.phpfreaks.com/forums/index.php/topic,300896.msg1424333.html#msg1424333 Quote Link to comment https://forums.phpfreaks.com/topic/205379-simple-ping-script/#findComment-1074821 Share on other sites More sharing options...
hungrypinkpig Posted June 21, 2010 Author Share Posted June 21, 2010 Does not work, returns "Offline!" im pinging the server.. $fp = fsockopen('174.34.144.162', 9800, $errno, $errstr, 5); echo $fp ? "Online!" : "Offline!"; And i know for a fact the server is online, because im playing on it. Quote Link to comment https://forums.phpfreaks.com/topic/205379-simple-ping-script/#findComment-1074826 Share on other sites More sharing options...
Alex Posted June 21, 2010 Share Posted June 21, 2010 Are you sure that's the right info? It didn't work when I tried it here: http://www.yougetsignal.com/tools/open-ports/ Quote Link to comment https://forums.phpfreaks.com/topic/205379-simple-ping-script/#findComment-1074829 Share on other sites More sharing options...
hungrypinkpig Posted June 21, 2010 Author Share Posted June 21, 2010 Auctualy.. Would some form of Anti-DDoS be blocking this script from pinging it? Because i had our host provider put in anti-ddos cause of attacks.. Quote Link to comment https://forums.phpfreaks.com/topic/205379-simple-ping-script/#findComment-1074831 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.