* Identify ourselves to Citadel using IDEN
authorArt Cancro <ajc@citadel.org>
Sun, 2 Nov 2003 06:04:27 +0000 (06:04 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 2 Nov 2003 06:04:27 +0000 (06:04 +0000)
ctdlphp/ctdlprotocol.php
ctdlphp/ctdlsession.php
ctdlphp/sessionproxy.php
ctdlphp/who.php

index 32d0030450e1504604ed78e55d5a955c94ae3927..e197952cdf304a64191ebe850effbf5849d56a8a 100644 (file)
@@ -30,6 +30,20 @@ function serv_puts($buf) {
        fwrite($clientsocket, $buf . "\n", (strlen($buf)+1) );
 }
 
+
+
+//
+// Identify this client, and the hostname where the user is, to Citadel.
+//
+function ctdl_iden() {
+       global $clientsocket;
+
+       serv_puts("IDEN 0|8|001|PHP web client|" . $_SERVER['REMOTE_ADDR'] );
+       $buf = serv_gets();
+}
+
+
+
 //
 // login_existing_user() -- attempt to login using a supplied username/password
 // Returns an array with two variables:
index 81e7c282924b6c155273dda069a9ef8017e48a34..a890e842149692bebc7d170fa755cdd9bdb9ee88 100644 (file)
@@ -45,6 +45,7 @@ function establish_citadel_session() {
                // Try to log the user back in.
                if ($clientsocket) {
 
+                       ctdl_iden();    // Identify client
 
                        if ($_SESSION["username"]) {
                                login_existing_user(
index a9e627e8770ead45575da98f20a266d059d3dbdf..9f56d18b58b25eb5e4a917c4743070dde9d373b5 100755 (executable)
@@ -84,7 +84,7 @@ chmod($sockname, 0600);
 // We need to get a connection to the Citadel server going now.
 
 $ctdlsock = fsockopen("uncensored.citadel.org", 504, $errno, $errstr, 30);
-// $ctdlsock = fsockopen("/appl/citadel/citadel.socket", 0, $errno, $errstr, 30);
+//$ctdlsock = fsockopen("/appl/citadel/citadel.socket", 0, $errno, $errstr, 30);
 if (!$ctdlsock) {
        socket_close ($sock);
        system("/bin/rm -f " . $sockname);
index d1f78366eb7dc544e43ce3ef9d9f1895bb874bc2..019354a33252035e35c50dd4510c729ea1533e32 100644 (file)
@@ -2,7 +2,6 @@
        include "ctdlheader.php";
        bbs_page_header();
 
-
        echo "<TABLE border=1>";
        echo "<TR>";
        echo "<TD><B>User</B></TD>";