Jump to content

Recommended Posts

else
      {
      $view = @fsockopen($_POST['ip'],$_POST['port'],$errorNumber,$errorMessage,1);
      if($view){
      mysql_query("INSERT INTO `servers` (`name`, `port`, `desc`, `pass`, `ip`, `ip2`) VALUES ('". htmlentities(mysql_real_escape_string($_POST['name'])) ."', '". htmlentities(mysql_real_escape_string($_POST['port'])) ."', '". htmlentities(mysql_real_escape_string($_POST['desc'])) ."', '". htmlentities(mysql_real_escape_string($_POST['pass'])) ."', '". htmlentities(mysql_real_escape_string($_POST['ip'])) ."', '". $_SERVER['REMOTE_ADDR'] ."')") or die('Could not connect: ' . mysql_error());
      echo "The server Has been added to the database";
      echo "<meta http-equiv=Refresh content=2;url='index.php'>";
      }
      else
      {
      echo "The server is offline or does not exist";
      echo "<meta http-equiv=Refresh content=2;url='index.php'>";
      }
      }
  }
}

 

 

i try to add a server to my site thats online.

it comes up offline.

 

is there anything wrong with my fsock???

Link to comment
Share on other sites

Well, obviously you should remove the error suppression and perhaps try to check the values of $errorNumber and $errorMessage variables you are defining.

 

How about trying to help yourself? I believe numerous people already told you so. Did you read that document about how to ask questions I referred you to? If you haven't, do that and don't post here before you've read it completely.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.