Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for phpPlatonLib/Net_Ident/Attic/Ident.php between version 1.4 and 1.5

version 1.4, 2002/10/01 11:52:57 version 1.5, 2002/10/01 11:58:39
Line 59  define('NET_IDENT_STATUS_ERROR',
Line 59  define('NET_IDENT_STATUS_ERROR',
  *   <?php   *   <?php
  *       require_once 'Net/Ident.php';   *       require_once 'Net/Ident.php';
  *       $ident   = new Net_Ident;   *       $ident   = new Net_Ident;
  *       $user    = $ident->user();   *       $user    = $ident->getUser();
  *       $os_type = $ident->osType();   *       $os_type = $ident->getOsType();
  *       echo "user: $user, operating system: $os_type\n";   *       echo "user: $user, operating system: $os_type\n";
  *   ?>   *   ?>
  *   *
Line 234  class Net_Ident
Line 234  class Net_Ident
             }              }
             $this->_status = NET_IDENT_STATUS_ERROR;              $this->_status = NET_IDENT_STATUS_ERROR;
             $this->_error  = 'Error connecting to ident server ('              $this->_error  = 'Error connecting to ident server ('
                     .$this->_props['remote_addr'].':'.$this->_props['ident_port']                      .$this->_props['remote_addr'].':'
                     ."): $errstr ($errno)"; // )                      .$this->_props['ident_port']."): $errstr ($errno)"; // )
         }          }
   
         $line = $this->_props['remote_port'].','.$this->_props['local_port']."\r\n";          $line = $this->_props['remote_port'].','
               .$this->_props['local_port']."\r\n";
         @fwrite($socket, $line);          @fwrite($socket, $line);
         $line = @fgets($socket, 1000); // 1000 octets according to RFC 1413          $line = @fgets($socket, 1000); // 1000 octets according to RFC 1413
         fclose($socket);          fclose($socket);
Line 258  class Net_Ident
Line 259  class Net_Ident
      *                  username string on success       *                  username string on success
      * @access  public       * @access  public
      */       */
     function user()      function getUser()
     {      {
         $this->_status == NET_IDENT_STATUS_UNDEF && $this->query();          $this->_status == NET_IDENT_STATUS_UNDEF && $this->query();
         if ($this->_status == NET_IDENT_STATUS_ERROR) {          if ($this->_status == NET_IDENT_STATUS_ERROR) {
Line 275  class Net_Ident
Line 276  class Net_Ident
      *                  operating system type string on success       *                  operating system type string on success
      * @access  public       * @access  public
      */       */
     function osType()      function getOsType()
     {      {
         $this->_status == NET_IDENT_STATUS_UNDEF && $this->query();          $this->_status == NET_IDENT_STATUS_UNDEF && $this->query();
         if ($this->_status == NET_IDENT_STATUS_ERROR) {          if ($this->_status == NET_IDENT_STATUS_ERROR) {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top