PEAR Manual
This manual is provided as a courtesy. It is not an official source. Please check pear.php.net for updated information.
require_once 'Net/NNTP/Client.php';
boolean Net_NNTP_Client::connectAuthenticated ([integer $user = NULL [, integer $pass = NULL [, string $host = NET_NNTP_PROTOCOL_DEFAULT_HOST [, integer $port = NET_NNTP_PROTOCOL_DEFAULT_PORT [, integer $authmode = NET_NNTP_AUTHORIGINAL]]]]])
boolean Net_NNTP_Client::connectAuthenticated
Connect and authenticate to a specific NNTP-server
This function is deprecated. That means that future versions of this package may not support it anymore.
$user - Username to authenticate
$pass - Password to authenticate
$host - Hostname of the NNTP-server. Default=NET_NNTP_PROTOCOL_DEFAULT_HOST
$port - Port, where the NNTP-server listens. Default=NET_NNTP_PROTOCOL_DEFAULT_PORT
$authmode - Type of authentication. Default=NET_NNTP_AUTHORIGINAL
boolean - Returns TRUE on success, PEAR_Error on failure.
Table 47-1. Possible PEAR_Error values
wrong hostname/ip-address or port
the host itself isn't linked to a network
a firewall doesn't allow access
since 0.3
This function can not be called statically.
Net_NNTP_Client::connect() Net_NNTP_Client::quit(),
Example 47-1. Using connectauthenticated()
require_once 'Net/NNTP/Client.php'; $nntp = new Net_NNTP_Client(); $ret = $nntp->connectAuthenticated('news.php.net'); if( PEAR::isError($ret)) { // handle error } else { // success }