On Fri, 5 Apr 2002, Liam Gibbs wrote: > I'm trying to connect to the server (same one from > which the page is at). My code is as follows: > > if($searchsocket = fsockopen("127.0.0.1", 8080, > &$errornumber, &$errormessage, 30)) { > > Obviously 127.0.0.1 is not the real IP address. But it's at this point > that it's reporting error number 111 (Connection refused). Is that > because my line of code is wrong? I'm trying to connect to port 8080. > Should I just leave the port blank and put :8080 after the IP address?
Nope, you have the port number in the right place. The reason you're getting Connection Refused is probably because the connection is being refused. Do you have shell access on the machine where the PHP program is running? Try using a simple tool like netcat to see whether your connections really are being accepted at that port? miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php