Net/Socket.php
public function readIPAddress()
    {
        if (!is_resource($this->fp)) {
            return $this->raiseError('not connected');
        }

        $buf = @fread($this->fp, 4);

        return sprintf('%d.%d.%d.%d', ord($buf[0]), ord($buf[1]),
            ord($buf[2]), ord($buf[3]));
    }
public function readIPAddress()
    {
        if (!is_resource($this->fp)) {
            return $this->raiseError('not connected');
        }

        $buf = @fread($this->fp, 4);

        return sprintf('%d.%d.%d.%d', ord($buf[0]), ord($buf[1]),
            ord($buf[2]), ord($buf[3]));
    }
public function readIPAddress ( ) { if ( ! is_resource ( $ this -> fp ) ) { return $ this -> raiseError ( 'not connected' ) ; } $ buf = @ fread ( $ this -> fp , 4 ) ; return sprintf ( '%d.%d.%d.%d' , ord ( $ buf [ 0 ] ) , ord ( $ buf [ 1 ] ) , ord ( $ buf [ 2 ] ) , ord ( $ buf [ 3 ] ) ) ; }
Reads an IP Address and returns it in a dot formatted string

@access public
@return string Dot formatted string, or a PEAR_Error if
not connected.
Reads an IP Address and returns it in a dot formatted string