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"; } ?> Quote Link to comment Share on other sites More sharing options...
scootstah Posted February 13, 2013 Share Posted February 13, 2013 (edited) 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. Edited February 13, 2013 by scootstah Quote Link to comment 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.