gergy008 Posted December 5, 2010 Share Posted December 5, 2010 Okay, I'm using fsockopen to see if a port is being used, But all it does it crashes the page if it isn't. If it is one it works but if it is off the pages just doesn't load at all. Code: <?php $fp=fsockopen("localhost", 43594, $errno, $errstr, 30); if($fp){ echo('The server is <font color="#0066FF"><b>Online!</b></font>'); } else { echo('The server is <font color="#FF0000"><b>Offline!</b></font>'); } ?> Can one of you amazing helpful souls help me out? Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/220759-checking-if-a-port-is-being-used-with-fsockopen/ Share on other sites More sharing options...
btherl Posted December 6, 2010 Share Posted December 6, 2010 Hmm.. I would try adding this to the top: ini_set('display_errors', 1); Maybe it will tell you something useful. Link to comment https://forums.phpfreaks.com/topic/220759-checking-if-a-port-is-being-used-with-fsockopen/#findComment-1143452 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.