ba55meister Posted April 27, 2009 Share Posted April 27, 2009 Hi I'm trying to create PHP script that checks if the port is open. I've configured my router port forwarding for port no 23000 and I get a "success" result from www.canyouseeme.org But when I upload my script on to my domain and run it i get an error message: Warning: fsockopen() [function.fsockopen]: unable to connect to 90.192.247.56:23000 (Connection timed out) in /home/user109/public_html/test/pcheck.php on line 4 cant see Please help <?php $ipnumber = $_SERVER[REMOTE_ADDR]; $portnumber = "23000"; $fp = fsockopen($ipnumber,$portnumber,$errnum,$errstr,10); if(!$fp) { $result = "cant see"; } else { $result = "success"; fclose($fp); } echo $result; ?> Link to comment https://forums.phpfreaks.com/topic/155851-open-port-checker-script-problem/ Share on other sites More sharing options...
ba55meister Posted April 27, 2009 Author Share Posted April 27, 2009 I found this thread http://forum.utorrent.com/viewtopic.php?id=38371 the link to the script there shows my port 23000 as open but when I copy the script and upload it to my hosting i get the "closed" result. bah! Any ideas? is it my PHP configuration on the server? or it Apache or what? it's doing my head in Link to comment https://forums.phpfreaks.com/topic/155851-open-port-checker-script-problem/#findComment-820582 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.