|
|
(Next) Net_NNTP_Client::connectAuthenticated() |
||||
| |
|||||
|
|||||
boolean Net_NNTP_Client::connect (
string $host = NET_NNTP_PROTOCOL_DEFAULT_HOST
,
integer $port = NET_NNTP_PROTOCOL_DEFAULT_PORT
)
指定した NNTP サーバに接続します。
$host - NNTP サーバのホスト名。デフォルトは NET_NNTP_PROTOCOL_DEFAULT_HOST
$port - NNTP サーバのポート番号。デフォルトは NET_NNTP_PROTOCOL_DEFAULT_PORT
boolean - Returns TRUE on success, PEAR_Error on failure.
| エラー番号 | エラーメッセージ | 原因 | 対応方法 |
|---|---|---|---|
| NULL | "Could not connect to NNTP-server $host" または "Not connected" |
接続が確立できませんでした。原因は
|
サーバ名やネットワーク接続の状況を調べます。また、可能なら ファイアウォールの設定も確かめます。 |
This function can not be called statically.
connect() の使用
<?php
require_once 'Net/NNTP/Client.php';
$nntp = new Net_NNTP_Client();
$ret = $nntp->connect('news.php.net');
if( PEAR::isError($ret)) {
// エラー処理
} else {
// 成功
}
?>
|
|
(Next) Net_NNTP_Client::connectAuthenticated() |
||||||||
| |
|||||||||
|
|||||||||