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

Diff for phpPlatonLib/Net_Ident/Attic/Ident.php between version 1.2 and 1.3

version 1.2, 2002/09/04 17:09:28 version 1.3, 2002/09/19 12:04:43
Line 19 
Line 19 
 // +----------------------------------------------------------------------+  // +----------------------------------------------------------------------+
 //  //
 // $Id$  // $Id$
   //
   // Identification Protocol implementation
   //
   
 require_once 'PEAR.php';  require_once 'PEAR.php';
   
 /**  /**
  * Net_Ident default values   * Net_Ident default values
    * @const   NET_IDENT_DEFAULT_TIMEOUT   Default ident query network timeout
    * @const   NET_IDENT_DEFAULT_PORT      Default ident protocol port
  */   */
 define('NET_IDENT_DEFAULT_TIMEOUT',      30);  define('NET_IDENT_DEFAULT_TIMEOUT',      30);
 define('NET_IDENT_DEFAULT_PORT',        113);  define('NET_IDENT_DEFAULT_PORT',        113);
   
 /**  /**
  * Net_Ident object states   * Net_Ident object states
    * @const   NET_IDENT_STATUS_UNDEF      Undefined Net_Ident object state
    * @const   NET_IDENT_STATUS_OK         Net_Ident object did successful query
    * @const   NET_IDENT_STATUS_ERROR      Net_Ident object query failed
  */   */
 define('NET_IDENT_STATUS_UNDEF',          0);  define('NET_IDENT_STATUS_UNDEF',          0);
 define('NET_IDENT_STATUS_OK',             1);  define('NET_IDENT_STATUS_OK',             1);
Line 137  class Net_Ident
Line 145  class Net_Ident
      */       */
     function setRemoteAddr($remote_addr)      function setRemoteAddr($remote_addr)
     {      {
         if (strlen($remote_addr) <= 0) {          strlen($remote_addr) <= 0 && $remote_addr = $_SERVER['REMOTE_ADDR'];
             global $HTTP_SERVER_VARS;  
             $remote_addr = $HTTP_SERVER_VARS['REMOTE_ADDR'];  
         }  
         $this->_props['remote_addr'] = $remote_addr;          $this->_props['remote_addr'] = $remote_addr;
     }      }
   
Line 153  class Net_Ident
Line 158  class Net_Ident
      */       */
     function setRemotePort($remote_port)      function setRemotePort($remote_port)
     {      {
         if (intval($remote_port) <= 0) {          $remote_port = intval($remote_port);
             global $HTTP_SERVER_VARS;          $remote_port <= 0 && $remote_port = $_SERVER['REMOTE_PORT'];
             $remote_port = $HTTP_SERVER_VARS['REMOTE_PORT'];  
         }  
         $this->_props['remote_port'] = $remote_port;          $this->_props['remote_port'] = $remote_port;
     }      }
   
Line 167  class Net_Ident
Line 170  class Net_Ident
      * @return  none       * @return  none
      * @access  public       * @access  public
      */       */
     function setLocalPort($port)      function setLocalPort($local_port)
     {      {
         if (intval($port) <= 0) {          $local_port = intval($local_port);
             global $HTTP_SERVER_VARS;          $local_port <= 0 && $local_port = $_SERVER['SERVER_PORT'];
             $port = $HTTP_SERVER_VARS['SERVER_PORT'];          $this->_props['local_port'] = $local_port;
         }  
         $this->_props['local_port'] = $port;  
     }      }
   
     /**      /**
Line 183  class Net_Ident
Line 184  class Net_Ident
      * @return  none       * @return  none
      * @access  public       * @access  public
      */       */
     function setIdentPort($port)      function setIdentPort($ident_port)
     {      {
         if (intval($port) <= 0) {          $ident_port = intval($ident_port);
             $port = NET_IDENT_DEFAULT_PORT;          $ident_port <= 0 && $ident_port = NET_IDENT_DEFAULT_PORT;
         }          $this->_props['ident_port'] = $ident_port;
         $this->_props['ident_port'] = $port;  
     }      }
   
     /**      /**
Line 200  class Net_Ident
Line 200  class Net_Ident
      */       */
     function setTimeout($timeout)      function setTimeout($timeout)
     {      {
         if (intval($timeout) <= 0) {          $timeout = intval($timeout);
             $port = NET_IDENT_DEFAULT_TIMEOUT;          $timeout <= 0 && $timeout = NET_IDENT_DEFAULT_TIMEOUT;
         }  
         $this->_props['timeout'] = $timeout;          $this->_props['timeout'] = $timeout;
     }      }
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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