Net_Ident
[ class tree: Net_Ident ] [ index: Net_Ident ] [ all elements ]

Class: Net_Ident

Source Location: /Net_Ident-1.1.0/Ident.php

Class Overview


Net_Ident - Identification Protocol implementation according to RFC 1413


Author(s):

Version:

  • 1.1.0

Methods


Inherited Variables

Inherited Methods


Class Details

[line 72]
Net_Ident - Identification Protocol implementation according to RFC 1413

The Identification Protocol (a.k.a., "ident", a.k.a., "the Ident Protocol") provides a means to determine the identity of a user of a particular TCP connection. Given a TCP port number pair, it returns a character string which identifies the owner of that connection on the server's system.

You can find out more about the Ident protocol at

http://www.ietf.org/rfc/rfc1413.txt

Usage: <?php require_once 'Net/Ident.php'; $ident = new Net_Ident; $user = $ident->getUser(); $os_type = $ident->getOsType(); echo "user: $user, operating system: $os_type\n"; ?>



[ Top ]


Method Detail

Net_Ident (Constructor)   [line 124]

none Net_Ident( [string $remote_addr = ''], [int $remote_port = 0], [int $local_port = 0], [int $ident_port = 0], [int $timeout = 0])

Net_Ident object constructor

Initializes class properties. Use empty string '' for any string parameter and value of 0 for any int parameter to set default value.

  • Access: public

Parameters:

string   $remote_addr   —  Remote host address (IP or hostname)
int   $remote_port   —  Remote port (default $REMOTE_PORT)
int   $local_port   —  Local port (default $SERVER_PORT)
int   $ident_port   —  Ident port (default 113)
int   $timeout   —  Socket timeout (default 30 seconds)

[ Top ]

getOsType   [line 279]

mixed getOsType( )

Returns ident operating system type
  • Return: PEAR_Error on connection error false boolean on ident protocol error operating system type string on success
  • Access: public

[ Top ]

getUser   [line 262]

mixed getUser( )

Returns ident username
  • Return: PEAR_Error on connection error false boolean on ident protocol error username string on success
  • Access: public

[ Top ]

identError   [line 295]

mixed identError( )

Returns ident protocol error
  • Return: error string if ident protocol error had occured false otherwise
  • Access: public

[ Top ]

query   [line 215]

mixed query( )

Performs network socket ident query
  • Return: PEAR_Error on connection error rawdata read from socket on success
  • Access: public

[ Top ]

setIdentPort   [line 187]

none setIdentPort( int $ident_port)

Sets ident port
  • Access: public

Parameters:

int   $ident_port   —  Ident port (default 113)

[ Top ]

setLocalPort   [line 173]

none setLocalPort( int $local_port)

Sets local port
  • Access: public

Parameters:

int   $local_port   —  Local port (default $SERVER_PORT)

[ Top ]

setRemoteAddr   [line 146]

none setRemoteAddr( string $remote_addr)

Sets remote host address (IP or hostname)
  • Access: public

Parameters:

string   $remote_addr   —  Remote host address (IP or hostname)

[ Top ]

setRemotePort   [line 159]

none setRemotePort( int $remote_port)

Sets remote port
  • Access: public

Parameters:

int   $remote_port   —  Remote port (default $REMOTE_PORT)

[ Top ]

setTimeout   [line 201]

none setTimeout( int $timeout)

Sets socket timeout
  • Access: public

Parameters:

int   $timeout   —  Socket timeout (default 30 seconds)

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:28:30 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.