blacblu Posted February 7, 2013 Share Posted February 7, 2013 I have this code which works perfectly on my local network using XAMPP (PHP 5.4.7) but when I try to run on my server (PHP 5.2.17) the page just keep loading and doesn't finish. Is it because of the PHP version or something else? <?php $host = $_SERVER['REMOTE_ADDR']; $port = $_GET['port']; $connection = @fsockopen($host, $port); if (is_resource($connection)) { echo "Connected"; fclose($connection); } else { echo "Error"; } ?> Link to comment https://forums.phpfreaks.com/topic/274177-portforwarding-check-works-locally-but-not-on-server/ Share on other sites More sharing options...
scootstah Posted February 13, 2013 Share Posted February 13, 2013 Are you using shared hosting? Shared hosts typically only allow certain outgoing ports. If it is a VPS or something in which you have complete control, check the firewall configs. Link to comment https://forums.phpfreaks.com/topic/274177-portforwarding-check-works-locally-but-not-on-server/#findComment-1412137 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.