Jump to content

socket coonection


swemark

Recommended Posts

Does anybody have ideas or solutions for this type of problem.here is the code<?phperror_reporting(E_ALL);$server_port=12345;$nbytes=30720; //30 KB$username = "fpu";$password = "fpubm123";//$request ="1:" . $_REQUEST[$username] . ":" . $_REQUEST[$password];$request ="1:" . $username . ":" . $password;// Create a TCP/IP socket.$fp = stream_socket_client("tcp://217.35.137.164:" . $server_port, $errno, $errstr, 5);if (!$fp) { $temp="ERROR: connection to socket server failed...."; $output="<HTML>\n<BODY>\n" . $temp ." errno: ". $errno ." errstr:". $errstr."\n</BODY>\n</HTML>";} else { fwrite($fp, $request . "\n"); $response = fread($fp, $nbytes); if(strcmp(substr($response,0,4),"ERROR")==0) $output="<HTML><BODY>" . $response . "</BODY></HTML>"; else $output=$response; }echo $output;?> :)

Link to comment
Share on other sites

  • 3 years later...
Guest FirefoxRocks

This would probably be a server issue. Check Apache or with your hosting company, whichever applies in your case.

Link to comment
Share on other sites

Dude, you really need to stop replying to topics that are years and years old. Why do you keep doing that? It only clutters up the forum. More importantly, why don't you ever reply when someone asks you why you keep doing that?

Link to comment
Share on other sites

The odd thing is that the vast majority of his posts are responding to outdated topics, like he doesn't even bother responding to new topics. In his list of recent posts I saw one that was a response to a recent topic, the others were either old topics or questions he asked himself.Maybe we should all wait 3 years to respond to his questions.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...