/dev/null 2>&1 " . " 3>&1 4>&1 5>&1 6>&1 7>&1 8>&1 & " ; exec($cmd); sleep(2); // Ok, now try again. $clientsocket = fsockopen($sockname, 0, $errno, $errstr, 5); // Try to log the user back in. if ($clientsocket) { ctdl_iden(); // Identify client if ($_SESSION["username"]) { login_existing_user( $_SESSION["username"], $_SESSION["password"] ); } } } if ($clientsocket) { if (!$_SESSION["serv_humannode"]) { ctdl_get_serv_info(); } } else { echo "ERROR: no Citadel socket!
\n"; flush(); } } // // Clear out both our Citadel session and our PHP session. We're done. // function ctdl_end_session() { global $clientsocket, $session; // Tell the Citadel server to terminate our connection. // (The extra newlines force it to see that the Citadel session // ended, and the proxy will quit.) // fwrite($clientsocket, "QUIT\n\n\n\n\n\n\n\n\n\n\n"); $response = fgets($clientsocket, 4096); // IGnore response fclose($clientsocket); unset($clientsocket); // Now clear our PHP session. $_SESSION = array(); session_write_close(); } ?>