LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: omri Date: Sun Nov 23 23:31:54 2003 Subject: Sockets: is there a way to check if the remote host didn't close the connection?
host,port,connectiontimeout,username,password are pre DEFINEd values
function connect() {
$sock = @fsockopen (host, port, $errno, $errstr, connectiontimeout);
if ( $sock ) {
fputs($sock, username."\n");
fputs($sock, password."\n");
}
return $sock;
}
after sending the username and password, server will check if these values
are correct, if not, it'll disconnect the connection
Is there a way to determine if the connection still exists after I'm sending
the username and the password?
thanks!
| Navigate in group php.lang at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |