help me please Posted June 5, 2009 Share Posted June 5, 2009 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 https://forums.phpfreaks.com/topic/161058-fsock/ Share on other sites More sharing options...
help me please Posted June 5, 2009 Author Share Posted June 5, 2009 anyhelp plz Link to comment https://forums.phpfreaks.com/topic/161058-fsock/#findComment-849977 Share on other sites More sharing options...
jxrd Posted June 5, 2009 Share Posted June 5, 2009 Why are you suppressing errors when something is obviously going wrong??? Link to comment https://forums.phpfreaks.com/topic/161058-fsock/#findComment-850003 Share on other sites More sharing options...
help me please Posted June 6, 2009 Author Share Posted June 6, 2009 Quote Why are you suppressing errors when something is obviously going wrong??? yes so whats the error... Link to comment https://forums.phpfreaks.com/topic/161058-fsock/#findComment-850437 Share on other sites More sharing options...
Daniel0 Posted June 6, 2009 Share Posted June 6, 2009 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 https://forums.phpfreaks.com/topic/161058-fsock/#findComment-850439 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.