Jump to content

Portforwarding check works locally but not on server


blacblu

Recommended Posts

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";
   }
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.