previousNet_NNTP_Client::authenticate() (Previous) (Next) Net_NNTP_Client::connectAuthenticated()next

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Net_NNTP_Client::connect()

Net_NNTP_Client::connect() – NNTP サーバに接続する

Synopsis

require_once 'Net/NNTP/Client.php';

boolean Net_NNTP_Client::connect ( string $host = NET_NNTP_PROTOCOL_DEFAULT_HOST , integer $port = NET_NNTP_PROTOCOL_DEFAULT_PORT )

Description

指定した NNTP サーバに接続します。

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

This function can not be called statically.

Example

connect() の使用

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

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

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.