Net_NNTP_Client::connectAuthenticated()

Net_NNTP_Client::connectAuthenticated() – NNTP サーバに接続し、認証を行う

Synopsis

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 )

Description

指定した NNTP サーバに接続し、認証を行います。

This function is deprecated. That means that future versions of this package may not support it anymore.

Parameter

Return value

boolean - Returns TRUE on success, PEAR_Error on failure.

Throws

Possible PEAR_Error values
エラー番号 エラーメッセージ 原因 対応方法
NULL "Could not connect to NNTP-server $host" または "Not connected" 接続が確立できませんでした。原因は
  • サーバ名あるいは IP アドレスやポート番号が間違っている
  • ホストがネットワークに接続されていない
  • ファイアウォールによってアクセスが制限されている
サーバ名やネットワーク接続の状況を調べます。また、可能なら ファイアウォールの設定も確かめます。

Note

0.3 以降

This function can not be called statically.

Example

connectauthenticated() の使用

<?php
require_once 'Net/NNTP/Client.php';

$nntp = new Net_NNTP_Client();
$ret $nntp->connectAuthenticated('news.php.net');
if( 
PEAR::isError($ret)) {
    
// エラー処理
} else {
    
// 成功
}
?>