Net_NNTP_Realtime::connectAuthenticated() -- Connect and authenticate to a NNTP-server Описание
Connect and authenticate to a specific NNTP-server
Возвращаемое значение
boolean -
Возвращает TRUE при удаче и
PEAR_Error в обратном случае.
Throws
Таблица 34-1. Возможные значения PEAR_Error Error code | Error message | Reason | Solution |
---|
NULL |
"Could not connect to NNTP-server $host"
or
"Not connected"
|
The connection couldn't be established because
wrong hostname/ip-address or port the host itself isn't linked to a network a firewall doesn't allow access
|
Check for server name, the connection to the net and possible
firewalls on client or server side.
|
Заметка
since 0.3
Эта функция не должна вызываться статически. ПримерПример 34-1. Using connectauthenticated()
<?php
require_once 'Net/NNTP/Realtime.php';
$nntp = new Net_NNTP_Realtime();
$ret = $nntp->connectAuthenticated('news.php.net');
if( PEAR::isError($ret)) {
// handle error
} else {
// success
}
?>
|
|
|