cvs: peardoc /en/package/networking/net-nntp/client connect.xml connectauthenticated.xml constants.xml count.xml first.xml getarticle.xml
getarticleraw.xml getbodyraw.xml getdate.xml getgroups.xml getheader.xml getheaderraw.xml getoverview.xml last.xml quit.xml selectgroup.xml
| From: | Heino H. Gehlsen | Date: | Fri, 23 Jul 2004 23:52:01 +0000 |
| Subject: | cvs: peardoc /en/package/networking/net-nntp/client connect.xml connectauthenticated.xml constants.xml count.xml first.xml getarticle.xml getarticleraw.xml getbodyraw.xml getdate.xml getgroups.xml getheader.xml getheaderraw.xml getoverview.xml last.xml quit.xml selectgroup.xml |
||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-4642@lists.php.net to get a copy of this message | ||
heino Fri Jul 23 19:52:01 2004 EDT
Added files:
/peardoc/en/package/networking/net-nntp/client connect.xml
connectauthenticated.xml
constants.xml
count.xml first.xml
getarticle.xml
getarticleraw.xml
getbodyraw.xml
getdate.xml
getgroups.xml
getheader.xml
getheaderraw.xml
getoverview.xml
last.xml quit.xml
selectgroup.xml
Log:
=rename 'peardoc/en/package/networking/net-nntp/realtime/' ->
'peardoc/en/package/networking/net-nntp/client/' as per v0.11.0
http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/connect.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/connect.xml +++ peardoc/en/package/networking/net-nntp/client/connect.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.connect"> <refnamediv> <refname>Net_NNTP_Client::connect()</refname> <refpurpose>Connects to a NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Net_NNTP_Client::connect</function></funcdef> <paramdef> string <parameter><optional>$host = <link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></link></optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$port = <link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></link></optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.connect.desc"> &title.desc; <para> Connect to a specific NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$host</parameter> - Hostname of the NNTP-server. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></link> </para> </listitem> <listitem> <para> <parameter>$port</parameter> - Port, where the NNTP-server listens. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></link> </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.return"> &title.returns; <para> <parameter>boolean</parameter> - &return.success-pearerror; </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> <parameter>"Could not connect to NNTP-server $host" </parameter> or <parameter>"Not connected"</parameter> </entry> <entry> The connection couldn't be established because <itemizedlist> <listitem> <simpara>wrong hostname/ip-address or port</simpara> </listitem> <listitem> <simpara>the host itself isn't linked to a network</simpara> </listitem> <listitem> <simpara>a firewall doesn't allow access</simpara> </listitem> </itemizedlist> </entry> <entry> Check for server name, the connection to the net and possible firewalls on client or server side. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.quit"> <function>Net_NNTP::quit</function></link>, <link linkend="package.networking.net-nntp.ancient.prepareconnection"> <function>Net_NNTP::pepareConnection</function></link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.example"> &title.example; <example> <title>Using <function>connect</function></title> <programlisting role="php"> <![CDATA[ require_once 'Net/NNTP/Client.php'; $nntp = new Net_NNTP_Client(); $ret = $nntp->connect('news.php.net'); if( PEAR::isError($ret)) { // handle error } else { // success } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/connectauthenticated.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/connectauthenticated.xml +++ peardoc/en/package/networking/net-nntp/client/connectauthenticated.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.connectauthenticated"> <refnamediv> <refname>Net_NNTP_Client::connectAuthenticated()</refname> <refpurpose>Connect and authenticate to a NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Net_NNTP_Client::connectAuthenticated</function></funcdef> <paramdef> integer <parameter><optional>$user = &null;</optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$pass = &null;</optional></parameter> </paramdef> <paramdef> string <parameter><optional>$host = <link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></link></optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$port = <link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></link></optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$authmode = <link linkend="package.networking.net-nntp.client.constants.net-nntp-authoriginal"><constant>NET_NNTP_AUTHORIGINAL</constant></link></optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.desc"> &title.desc; <para> Connect and authenticate to a specific NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$user</parameter> - Username to authenticate </para> </listitem> <listitem> <para> <parameter>$pass</parameter> - Password to authenticate </para> </listitem> <listitem> <para> <parameter>$host</parameter> - Hostname of the NNTP-server. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></link> </para> </listitem> <listitem> <para> <parameter>$port</parameter> - Port, where the NNTP-server listens. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></link> </para> </listitem> <listitem> <para> <parameter>$authmode</parameter> - Type of authentication. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-authoriginal"><constant>NET_NNTP_AUTHORIGINAL</constant></link> </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.return"> &title.returns; <para> <parameter>boolean</parameter> - &return.success-pearerror; </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> <parameter>"Could not connect to NNTP-server $host" </parameter> or <parameter>"Not connected"</parameter> </entry> <entry> The connection couldn't be established because <itemizedlist> <listitem> <simpara>wrong hostname/ip-address or port</simpara> </listitem> <listitem> <simpara>the host itself isn't linked to a network</simpara> </listitem> <listitem> <simpara>a firewall doesn't allow access</simpara> </listitem> </itemizedlist> </entry> <entry> Check for server name, the connection to the net and possible firewalls on client or server side. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.connect"> <function>Net_NNTP_Client::connect</function></link> <link linkend="package.networking.net-nntp.client.quit"> <function>Net_NNTP_Client::quit</function></link>, </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.example"> &title.example; <example> <title>Using <function>connectauthenticated</function></title> <programlisting role="php"> <![CDATA[ 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 } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/constants.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/constants.xml +++ peardoc/en/package/networking/net-nntp/client/constants.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.constants"> <refnamediv> <refname>&title.constants;</refname> <refpurpose>&purpose.preconstants;</refpurpose> </refnamediv> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"> <title><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></title> <para> default NNTP hostname: localhost </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"> <title><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></title> <para> default NNTP port: 119 </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-authoriginal"> <title><constant>NET_NNTP_AUTHORIGINAL</constant></title> <para> authentication provided by the NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-authsimple"> <title><constant>NET_NNTP_AUTHSIMPLE</constant></title> <para> authentication provided by the NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-authgeneric"> <title><constant>NET_NNTP_AUTHGENERIC</constant></title> <para> authentication provided by the NNTP-server </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/count.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/count.xml +++ peardoc/en/package/networking/net-nntp/client/count.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.count"> <refnamediv> <refname>Net_NNTP_Client::count()</refname> <refpurpose>Get the number of articles in the current newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP_Client::count</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.count.desc"> &title.desc; <para> Retrieves the number of articles in the current newsgroup. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.count.return"> &title.returns; <para> <parameter>integer</parameter> - number of articles in newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.count.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.count.example"> &title.example; <example> <title>Using <function>first</function></title> <programlisting role="php"> <![CDATA[ ... $nntp->selectGroup("php.pear.dev"); echo "number of articles: ".$nntp->count(); ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/first.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/first.xml +++ peardoc/en/package/networking/net-nntp/client/first.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.first"> <refnamediv> <refname>Net_NNTP_Client::first()</refname> <refpurpose>Get the number of the first article in the current newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP_Client::first</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.first.desc"> &title.desc; <para> Retrieves the number of the first article in the current newsgroup. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.first.return"> &title.returns; <para> <parameter>integer</parameter> - lowest article number in newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.first.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.first.example"> &title.example; <example> <title>Using <function>first</function></title> <programlisting role="php"> <![CDATA[ ... $nntp->selectGroup("php.pear.dev"); echo "lowest message number: ".$nntp->first(); ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getarticle.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getarticle.xml +++ peardoc/en/package/networking/net-nntp/client/getarticle.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getarticle"> <refnamediv> <refname>Net_NNTP_Client::getArticle()</refname> <refpurpose>Fetch an article from the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP_Client::getArticle</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getarticle.desc"> &title.desc; <para> &warn.undocumented.func; </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticle.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getarticleraw"> <function>Net_NNTP_Client::getArticleRaw</function> </link> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getarticleraw.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getarticleraw.xml +++ peardoc/en/package/networking/net-nntp/client/getarticleraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getarticleraw"> <refnamediv> <refname>Net_NNTP_Client::getArticleRaw()</refname> <refpurpose>Fetch an article from the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP_Client::getArticleRaw</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> <paramdef> boolean <parameter>$implode = false</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getarticleraw.desc"> &title.desc; <para> Returns the whole article from the currently selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $article</parameter> - article number or Message-ID of the article to fetch </para> <para> <parameter>boolean $implode</parameter> - Determines if the resulting array is to be imploded into a string. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.return"> &title.returns; <para> <parameter>array/string</parameter> - If message exists the message or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> Different error messages </entry> <entry> The messages are directly passed from the news server, in the most cases caused by calling a non existing article </entry> <entry> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getarticle"> <function>Net_NNTP_Client::getArticle</function> </link>, <link linkend="package.networking.net-nntp.client.getheaderraw"> <function>Net_NNTP_Client::getHeaderRaw</function> </link>, <link linkend="package.networking.net-nntp.client.getbodyraw"> <function>Net_NNTP_Client::getBodyRaw</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.example"> &title.example; <example> <title>Using <function>getArticleRaw</function></title> <programlisting role="php"> <![CDATA[ ... $article = $nntp->getArticleRaw($msg_id); if( PEAR::isError($article)) { // handle error } else { // success } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getbodyraw.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getbodyraw.xml +++ peardoc/en/package/networking/net-nntp/client/getbodyraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getbodyraw"> <refnamediv> <refname>Net_NNTP_Client::getBodyRaw()</refname> <refpurpose>Fetch the body of an article from the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP_Client::getBodyRaw</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> <paramdef> boolean <parameter>$implode = false</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getbodyraw.desc"> &title.desc; <para> Returns the whole body of an article from the currently selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $article</parameter> - article number or Message-ID of the article to fetch </para> <para> <parameter>boolean $implode</parameter> - Determines if the resulting array is to be imploded into a string. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.return"> &title.returns; <para> <parameter>string/array</parameter> - If message exists the body or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> Different error messages </entry> <entry> The messages are directly passed from the news server, in the most cases caused by calling a non existing article </entry> <entry> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; <note> <para> <function>getBody</function> makes no converting of the body content to any character set. You get the content 'as is'. </para> </note> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getheaderraw"> <function>Net_NNTP_Client::getHeaderRaw</function> </link>, <link linkend="package.networking.net-nntp.client.getarticleraw"> <function>Net_NNTP_Client::getArticleRaw</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.example"> &title.example; <example> <title>Using <function>getBodyRaw</function></title> <programlisting role="php"> <![CDATA[ ... $body = $nntp->getBodyRaw($msgId); if( PEAR::isError($body)) { // handle error } else { // success - print body echo $body; } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getdate.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getdate.xml +++ peardoc/en/package/networking/net-nntp/client/getdate.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getdate"> <refnamediv> <refname>Net_NNTP_Client::getDate()</refname> <refpurpose>Get date from NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP_Client::getDate</function></funcdef> <paramdef> integer <parameter><optional>$format = 1</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getDate.desc"> &title.desc; <para> Retrieves the date from the NNTP-server. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getDate.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$format</parameter> - Tetermines which format to return. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getdate.return"> &title.returns; <para> <table> <title></title> <tgroup cols="2"> <thead> <row> <entry>$format</entry> <entry>returns</entry> </row> </thead> <tbody> <row> <entry> 0 </entry> <entry> <parameter>timestamp</parameter> </entry> </row> <row> <entry> 1 </entry> <entry> <parameter>array</parameter> - a hash with the date <itemizedlist> <listitem> <para><parameter>$date['y']</parameter> Year</para> </listitem> <listitem> <para><parameter>$date['m']</parameter> Month</para> </listitem> <listitem> <para><parameter>$date['d']</parameter> Day</para> </listitem> </itemizedlist> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getdate.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.getdate.example"> &title.example; <example> <title>Using <function>getDate</function></title> <programlisting role="php"> <![CDATA[ ... $date = $nntp->getDate(); echo "Date: ".$date['m']."-".$date['d']."-".$date['y']; ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getgroups.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getgroups.xml +++ peardoc/en/package/networking/net-nntp/client/getgroups.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getgroups"> <refnamediv> <refname>Net_NNTP_Client::getGroups()</refname> <refpurpose>Fetch list of avaible newsgroups</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Client::getGroups</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getgroups.desc"> &title.desc; <para> Returns a list of all avaible newsgroups </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getgroups.return"> &title.returns; <para> <parameter>array</parameter> - a two dimensional, nested array indicated by the name of the newsgroup, every entry contains information about the newsgroup: <itemizedlist> <listitem> <para> <parameter>$groups[newsgroup_name]['group']</parameter> Name of the newsgroup </para> </listitem> <listitem> <para> <parameter>$groups[newsgroup_name]['last']</parameter> Number of the last article </para> </listitem> <listitem> <para> <parameter>$groups[newsgroup_name]['first']</parameter> Number of the first article </para> </listitem> <listitem> <para> <parameter>$groups[newsgroup_name]['posting']</parameter> values: <parameter>y</parameter> - yes, <parameter>n</parameter> - no, <parameter>m</parameter> - moderated) </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getgroups.note"> &title.note; ¬e.notstatic; <warning> <para> Especially public news server can provide more then 30.000 newsgroup. So this function may runs longer then the maximum execution time set in the <filename>php.ini</filename>. </para> </warning> </refsect1> <refsect1 id="package.networking.net-nntp.client.getgroups.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.selectgroup"> <function>Net_NNTP_Client::selectGroup</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getgroups.example"> &title.example; <example> <title>Using <function>getGroups</function></title> <programlisting role="php"> <![CDATA[ ... $ret = $nntp->connect('news.php.net'); if( PEAR::isError($ret)) { // handle error } else { // success $groups = $nntp->getGroups(); // Print a list of avaible newsgroups foreach($groups as $group) { echo $group['group'].'<br>'; } } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getheader.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getheader.xml +++ peardoc/en/package/networking/net-nntp/client/getheader.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getheader"> <refnamediv> <refname>Net_NNTP_Client::getHeader()</refname> <refpurpose>Fetch the header of an article from the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>object <function>Net_NNTP_Client::getHeader</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getheader.desc"> &title.desc; <para> &warn.undocumented.func; </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheader.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getheaderraw"> <function>Net_NNTP_Client::getHeaderRaw</function> </link> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getheaderraw.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getheaderraw.xml +++ peardoc/en/package/networking/net-nntp/client/getheaderraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getheaderraw"> <refnamediv> <refname>Net_NNTP_Client::getHeaderRaw()</refname> <refpurpose>fetch message header</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>string <function>Net_NNTP_Client::getHeaderRaw</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> <paramdef> boolean <parameter>$implode = false</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getheaderraw.desc"> &title.desc; <para> Returns the whole header of an article in the currently selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $article</parameter> - article number or Message-ID of the article to fetch </para> <para> <parameter>boolean $implode</parameter> - Determines if the resulting array is to be imploded into a string. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.return"> &title.returns; <para> <parameter>array/string</parameter> - If message exists the header or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> Different error messages </entry> <entry> The messages are directly passed from the news server, in the most cases caused by calling a non existing article </entry> <entry> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getheader"> <function>Net_NNTP_Client::getHeader</function> </link>, <link linkend="package.networking.net-nntp.client.getarticleraw"> <function>Net_NNTP_Client::getArticleRaw</function> </link>, <link linkend="package.networking.net-nntp.client.getbodyraw"> <function>Net_NNTP_Client::getBodyRaw</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.example"> &title.example; <example> <title>Using <function>getHeaderRaw</function></title> <programlisting role="php"> <![CDATA[ ... $headers = $nntp->getHeaderRaw($msgId); if( PEAR::isError($headers)) { // handle error } else { // success - split the string into a array $headersArray = explode( "\n", $headers); } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getoverview.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getoverview.xml +++ peardoc/en/package/networking/net-nntp/client/getoverview.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getoverview"> <refnamediv> <refname>Net_NNTP_Client::getOverview()</refname> <refpurpose>Fetch newsgroup overview</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Client::getOverview</function></funcdef> <paramdef> string <parameter>$first</parameter> </paramdef> <paramdef> string <parameter>$last</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getoverview.desc"> &title.desc; <para> Returns (a certain range of) the overview of the currently selected newsgroup. selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$first</parameter> - first article number, start of the range </para> </listitem> <listitem> <para> <parameter>$last</parameter> - last article number, end of the range</para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.return"> &title.returns; <para> <parameter>array</parameter> - a nested array indicated by the message id of the article, every entry contains the header as array <programlisting role="php"> $msgs[message_id][headername] = headercontent </programlisting> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.note"> &title.note; ¬e.notstatic; <warning> <para> Be careful with choosing the range. It could requires some time to get a huge number of message headers. </para> </warning> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.see"> &title.see; <para> <link linkend="package.networking.net-nntp.ancient.getoverviewformat"> <function>Net_NNTP_Client::getOverviewFormat</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.example"> &title.example; <example> <title>Using <function>getOverview</function></title> <programlisting role="php"> <![CDATA[ ... $ret = $nntp->connect('news.php.net'); if( PEAR::isError($ret)) { // handle error } else { // print the last 10 messages $data = $nntp->selectGroup('php.pear.dev'); $msgs = $nntp->getOverview( $data['last'] - 10, $data[last]); foreach($msgs as $msg) { // print subjects echo $msg['subject'].'<br>'; } } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/last.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/last.xml +++ peardoc/en/package/networking/net-nntp/client/last.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.last"> <refnamediv> <refname>Net_NNTP_Client::last()</refname> <refpurpose>Get the number of the last article in the current newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP_Client::last</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.last.desc"> &title.desc; <para> Retrieves the number of the last article in the current newsgroup. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.last.return"> &title.returns; <para> <parameter>integer</parameter> - highest article number in newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.last.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.last.example"> &title.example; <example> <title>Using <function>last</function></title> <programlisting role="php"> <![CDATA[ ... $nntp->selectGroup("php.pear.dev"); echo "highest message number: ".$nntp->last(); ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/quit.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/quit.xml +++ peardoc/en/package/networking/net-nntp/client/quit.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.quit"> <refnamediv> <refname>Net_NNTP_Client::quit()</refname> <refpurpose>close the connection to the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>Net_NNTP_Client::quit</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.quit.desc"> &title.desc; <para> close the connection to the NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.quit.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.quit.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.connect"> <function>Net_NNTP_Client::connect</function></link>, </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/selectgroup.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/selectgroup.xml +++ peardoc/en/package/networking/net-nntp/client/selectgroup.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.selectgroup"> <refnamediv> <refname>Net_NNTP_Client::selectGroup()</refname> <refpurpose>select a newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Client::selectGroup</function></funcdef> <paramdef> string <parameter>$newsgroup</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.selectgroup.desc"> &title.desc; <para> Selects a specific newsgroup on the NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> string <parameter>$newsgroup</parameter> - Name of the newsgroup to access </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.return"> &title.returns; <para> <parameter>array</parameter> - If the newsgroup exists, an array is returned: <table> <title></title> <tgroup cols="2"> <thead> <row> <entry>Key</entry> <entry>Value</entry> </row> </thead> <tbody> <row> <entry>'count'</entry> <entry>Number of articles in the group</entry> </row> <row> <entry>'first'</entry> <entry>The first article number in the group</entry> </row> <row> <entry>'last'</entry> <entry>The last article number in the group</entry> </row> <row> <entry>'group'</entry> <entry>Groupname</entry> </row> </tbody> </tgroup> </table> otherwise a <classname>PEAR_Error</classname> is returned on fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> Different error messages </entry> <entry> The messages are directly passed from the news server, in the most cases caused by calling a non existing article </entry> <entry> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.connect"> <function>Net_NNTP_Client::connect</function> </link>, <link linkend="package.networking.net-nntp.ancient.getgroups"> <function>Net_NNTP_Client::getGroups</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.example"> &title.example; <example> <title>Using <function>selectGroup</function></title> <programlisting role="php"> <![CDATA[ ... $ret = $nntp->connect('news.php.net'); if( PEAR::isError($ret)) { // handle error } else { // success $data = $nntp->selectGroup('php.pear.dev'); // Print the count of articles echo "Count: ", $data['last'] - $data['first']; } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/connect.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/connect.xml +++ peardoc/en/package/networking/net-nntp/client/connect.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.connect"> <refnamediv> <refname>Net_NNTP_Client::connect()</refname> <refpurpose>Connects to a NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Net_NNTP_Client::connect</function></funcdef> <paramdef> string <parameter><optional>$host = <link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></link></optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$port = <link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></link></optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.connect.desc"> &title.desc; <para> Connect to a specific NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$host</parameter> - Hostname of the NNTP-server. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></link> </para> </listitem> <listitem> <para> <parameter>$port</parameter> - Port, where the NNTP-server listens. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></link> </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.return"> &title.returns; <para> <parameter>boolean</parameter> - &return.success-pearerror; </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> <parameter>"Could not connect to NNTP-server $host" </parameter> or <parameter>"Not connected"</parameter> </entry> <entry> The connection couldn't be established because <itemizedlist> <listitem> <simpara>wrong hostname/ip-address or port</simpara> </listitem> <listitem> <simpara>the host itself isn't linked to a network</simpara> </listitem> <listitem> <simpara>a firewall doesn't allow access</simpara> </listitem> </itemizedlist> </entry> <entry> Check for server name, the connection to the net and possible firewalls on client or server side. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.quit"> <function>Net_NNTP::quit</function></link>, <link linkend="package.networking.net-nntp.ancient.prepareconnection"> <function>Net_NNTP::pepareConnection</function></link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connect.example"> &title.example; <example> <title>Using <function>connect</function></title> <programlisting role="php"> <![CDATA[ require_once 'Net/NNTP/Client.php'; $nntp = new Net_NNTP_Client(); $ret = $nntp->connect('news.php.net'); if( PEAR::isError($ret)) { // handle error } else { // success } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/connectauthenticated.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/connectauthenticated.xml +++ peardoc/en/package/networking/net-nntp/client/connectauthenticated.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.connectauthenticated"> <refnamediv> <refname>Net_NNTP_Client::connectAuthenticated()</refname> <refpurpose>Connect and authenticate to a NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Net_NNTP_Client::connectAuthenticated</function></funcdef> <paramdef> integer <parameter><optional>$user = &null;</optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$pass = &null;</optional></parameter> </paramdef> <paramdef> string <parameter><optional>$host = <link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></link></optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$port = <link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></link></optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$authmode = <link linkend="package.networking.net-nntp.client.constants.net-nntp-authoriginal"><constant>NET_NNTP_AUTHORIGINAL</constant></link></optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.desc"> &title.desc; <para> Connect and authenticate to a specific NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$user</parameter> - Username to authenticate </para> </listitem> <listitem> <para> <parameter>$pass</parameter> - Password to authenticate </para> </listitem> <listitem> <para> <parameter>$host</parameter> - Hostname of the NNTP-server. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></link> </para> </listitem> <listitem> <para> <parameter>$port</parameter> - Port, where the NNTP-server listens. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></link> </para> </listitem> <listitem> <para> <parameter>$authmode</parameter> - Type of authentication. Default=<link linkend="package.networking.net-nntp.client.constants.net-nntp-authoriginal"><constant>NET_NNTP_AUTHORIGINAL</constant></link> </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.return"> &title.returns; <para> <parameter>boolean</parameter> - &return.success-pearerror; </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> <parameter>"Could not connect to NNTP-server $host" </parameter> or <parameter>"Not connected"</parameter> </entry> <entry> The connection couldn't be established because <itemizedlist> <listitem> <simpara>wrong hostname/ip-address or port</simpara> </listitem> <listitem> <simpara>the host itself isn't linked to a network</simpara> </listitem> <listitem> <simpara>a firewall doesn't allow access</simpara> </listitem> </itemizedlist> </entry> <entry> Check for server name, the connection to the net and possible firewalls on client or server side. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.connect"> <function>Net_NNTP_Client::connect</function></link> <link linkend="package.networking.net-nntp.client.quit"> <function>Net_NNTP_Client::quit</function></link>, </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.connectauthenticated.example"> &title.example; <example> <title>Using <function>connectauthenticated</function></title> <programlisting role="php"> <![CDATA[ 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 } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/constants.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/constants.xml +++ peardoc/en/package/networking/net-nntp/client/constants.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.constants"> <refnamediv> <refname>&title.constants;</refname> <refpurpose>&purpose.preconstants;</refpurpose> </refnamediv> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-protocol-default-host"> <title><constant>NET_NNTP_PROTOCOL_DEFAULT_HOST</constant></title> <para> default NNTP hostname: localhost </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-protocol-default-port"> <title><constant>NET_NNTP_PROTOCOL_DEFAULT_PORT</constant></title> <para> default NNTP port: 119 </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-authoriginal"> <title><constant>NET_NNTP_AUTHORIGINAL</constant></title> <para> authentication provided by the NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-authsimple"> <title><constant>NET_NNTP_AUTHSIMPLE</constant></title> <para> authentication provided by the NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.constants.net-nntp-authgeneric"> <title><constant>NET_NNTP_AUTHGENERIC</constant></title> <para> authentication provided by the NNTP-server </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/count.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/count.xml +++ peardoc/en/package/networking/net-nntp/client/count.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.count"> <refnamediv> <refname>Net_NNTP_Client::count()</refname> <refpurpose>Get the number of articles in the current newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP_Client::count</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.count.desc"> &title.desc; <para> Retrieves the number of articles in the current newsgroup. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.count.return"> &title.returns; <para> <parameter>integer</parameter> - number of articles in newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.count.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.count.example"> &title.example; <example> <title>Using <function>first</function></title> <programlisting role="php"> <![CDATA[ ... $nntp->selectGroup("php.pear.dev"); echo "number of articles: ".$nntp->count(); ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/first.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/first.xml +++ peardoc/en/package/networking/net-nntp/client/first.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.first"> <refnamediv> <refname>Net_NNTP_Client::first()</refname> <refpurpose>Get the number of the first article in the current newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP_Client::first</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.first.desc"> &title.desc; <para> Retrieves the number of the first article in the current newsgroup. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.first.return"> &title.returns; <para> <parameter>integer</parameter> - lowest article number in newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.first.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.first.example"> &title.example; <example> <title>Using <function>first</function></title> <programlisting role="php"> <![CDATA[ ... $nntp->selectGroup("php.pear.dev"); echo "lowest message number: ".$nntp->first(); ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getarticle.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getarticle.xml +++ peardoc/en/package/networking/net-nntp/client/getarticle.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getarticle"> <refnamediv> <refname>Net_NNTP_Client::getArticle()</refname> <refpurpose>Fetch an article from the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP_Client::getArticle</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getarticle.desc"> &title.desc; <para> &warn.undocumented.func; </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticle.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getarticleraw"> <function>Net_NNTP_Client::getArticleRaw</function> </link> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getarticleraw.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getarticleraw.xml +++ peardoc/en/package/networking/net-nntp/client/getarticleraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getarticleraw"> <refnamediv> <refname>Net_NNTP_Client::getArticleRaw()</refname> <refpurpose>Fetch an article from the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP_Client::getArticleRaw</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> <paramdef> boolean <parameter>$implode = false</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getarticleraw.desc"> &title.desc; <para> Returns the whole article from the currently selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $article</parameter> - article number or Message-ID of the article to fetch </para> <para> <parameter>boolean $implode</parameter> - Determines if the resulting array is to be imploded into a string. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.return"> &title.returns; <para> <parameter>array/string</parameter> - If message exists the message or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> Different error messages </entry> <entry> The messages are directly passed from the news server, in the most cases caused by calling a non existing article </entry> <entry> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getarticle"> <function>Net_NNTP_Client::getArticle</function> </link>, <link linkend="package.networking.net-nntp.client.getheaderraw"> <function>Net_NNTP_Client::getHeaderRaw</function> </link>, <link linkend="package.networking.net-nntp.client.getbodyraw"> <function>Net_NNTP_Client::getBodyRaw</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getarticleraw.example"> &title.example; <example> <title>Using <function>getArticleRaw</function></title> <programlisting role="php"> <![CDATA[ ... $article = $nntp->getArticleRaw($msg_id); if( PEAR::isError($article)) { // handle error } else { // success } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getbodyraw.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getbodyraw.xml +++ peardoc/en/package/networking/net-nntp/client/getbodyraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getbodyraw"> <refnamediv> <refname>Net_NNTP_Client::getBodyRaw()</refname> <refpurpose>Fetch the body of an article from the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP_Client::getBodyRaw</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> <paramdef> boolean <parameter>$implode = false</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getbodyraw.desc"> &title.desc; <para> Returns the whole body of an article from the currently selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $article</parameter> - article number or Message-ID of the article to fetch </para> <para> <parameter>boolean $implode</parameter> - Determines if the resulting array is to be imploded into a string. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.return"> &title.returns; <para> <parameter>string/array</parameter> - If message exists the body or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> Different error messages </entry> <entry> The messages are directly passed from the news server, in the most cases caused by calling a non existing article </entry> <entry> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; <note> <para> <function>getBody</function> makes no converting of the body content to any character set. You get the content 'as is'. </para> </note> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getheaderraw"> <function>Net_NNTP_Client::getHeaderRaw</function> </link>, <link linkend="package.networking.net-nntp.client.getarticleraw"> <function>Net_NNTP_Client::getArticleRaw</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getbodyraw.example"> &title.example; <example> <title>Using <function>getBodyRaw</function></title> <programlisting role="php"> <![CDATA[ ... $body = $nntp->getBodyRaw($msgId); if( PEAR::isError($body)) { // handle error } else { // success - print body echo $body; } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getdate.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getdate.xml +++ peardoc/en/package/networking/net-nntp/client/getdate.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getdate"> <refnamediv> <refname>Net_NNTP_Client::getDate()</refname> <refpurpose>Get date from NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP_Client::getDate</function></funcdef> <paramdef> integer <parameter><optional>$format = 1</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getDate.desc"> &title.desc; <para> Retrieves the date from the NNTP-server. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getDate.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$format</parameter> - Tetermines which format to return. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getdate.return"> &title.returns; <para> <table> <title></title> <tgroup cols="2"> <thead> <row> <entry>$format</entry> <entry>returns</entry> </row> </thead> <tbody> <row> <entry> 0 </entry> <entry> <parameter>timestamp</parameter> </entry> </row> <row> <entry> 1 </entry> <entry> <parameter>array</parameter> - a hash with the date <itemizedlist> <listitem> <para><parameter>$date['y']</parameter> Year</para> </listitem> <listitem> <para><parameter>$date['m']</parameter> Month</para> </listitem> <listitem> <para><parameter>$date['d']</parameter> Day</para> </listitem> </itemizedlist> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getdate.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.getdate.example"> &title.example; <example> <title>Using <function>getDate</function></title> <programlisting role="php"> <![CDATA[ ... $date = $nntp->getDate(); echo "Date: ".$date['m']."-".$date['d']."-".$date['y']; ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getgroups.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getgroups.xml +++ peardoc/en/package/networking/net-nntp/client/getgroups.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getgroups"> <refnamediv> <refname>Net_NNTP_Client::getGroups()</refname> <refpurpose>Fetch list of avaible newsgroups</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Client::getGroups</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getgroups.desc"> &title.desc; <para> Returns a list of all avaible newsgroups </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getgroups.return"> &title.returns; <para> <parameter>array</parameter> - a two dimensional, nested array indicated by the name of the newsgroup, every entry contains information about the newsgroup: <itemizedlist> <listitem> <para> <parameter>$groups[newsgroup_name]['group']</parameter> Name of the newsgroup </para> </listitem> <listitem> <para> <parameter>$groups[newsgroup_name]['last']</parameter> Number of the last article </para> </listitem> <listitem> <para> <parameter>$groups[newsgroup_name]['first']</parameter> Number of the first article </para> </listitem> <listitem> <para> <parameter>$groups[newsgroup_name]['posting']</parameter> values: <parameter>y</parameter> - yes, <parameter>n</parameter> - no, <parameter>m</parameter> - moderated) </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getgroups.note"> &title.note; ¬e.notstatic; <warning> <para> Especially public news server can provide more then 30.000 newsgroup. So this function may runs longer then the maximum execution time set in the <filename>php.ini</filename>. </para> </warning> </refsect1> <refsect1 id="package.networking.net-nntp.client.getgroups.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.selectgroup"> <function>Net_NNTP_Client::selectGroup</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getgroups.example"> &title.example; <example> <title>Using <function>getGroups</function></title> <programlisting role="php"> <![CDATA[ ... $ret = $nntp->connect('news.php.net'); if( PEAR::isError($ret)) { // handle error } else { // success $groups = $nntp->getGroups(); // Print a list of avaible newsgroups foreach($groups as $group) { echo $group['group'].'<br>'; } } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getheader.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getheader.xml +++ peardoc/en/package/networking/net-nntp/client/getheader.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getheader"> <refnamediv> <refname>Net_NNTP_Client::getHeader()</refname> <refpurpose>Fetch the header of an article from the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>object <function>Net_NNTP_Client::getHeader</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getheader.desc"> &title.desc; <para> &warn.undocumented.func; </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheader.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getheaderraw"> <function>Net_NNTP_Client::getHeaderRaw</function> </link> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getheaderraw.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getheaderraw.xml +++ peardoc/en/package/networking/net-nntp/client/getheaderraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getheaderraw"> <refnamediv> <refname>Net_NNTP_Client::getHeaderRaw()</refname> <refpurpose>fetch message header</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>string <function>Net_NNTP_Client::getHeaderRaw</function></funcdef> <paramdef> string <parameter>$article</parameter> </paramdef> <paramdef> boolean <parameter>$implode = false</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getheaderraw.desc"> &title.desc; <para> Returns the whole header of an article in the currently selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $article</parameter> - article number or Message-ID of the article to fetch </para> <para> <parameter>boolean $implode</parameter> - Determines if the resulting array is to be imploded into a string. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.return"> &title.returns; <para> <parameter>array/string</parameter> - If message exists the header or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> Different error messages </entry> <entry> The messages are directly passed from the news server, in the most cases caused by calling a non existing article </entry> <entry> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.getheader"> <function>Net_NNTP_Client::getHeader</function> </link>, <link linkend="package.networking.net-nntp.client.getarticleraw"> <function>Net_NNTP_Client::getArticleRaw</function> </link>, <link linkend="package.networking.net-nntp.client.getbodyraw"> <function>Net_NNTP_Client::getBodyRaw</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getheaderraw.example"> &title.example; <example> <title>Using <function>getHeaderRaw</function></title> <programlisting role="php"> <![CDATA[ ... $headers = $nntp->getHeaderRaw($msgId); if( PEAR::isError($headers)) { // handle error } else { // success - split the string into a array $headersArray = explode( "\n", $headers); } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/getoverview.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/getoverview.xml +++ peardoc/en/package/networking/net-nntp/client/getoverview.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.getoverview"> <refnamediv> <refname>Net_NNTP_Client::getOverview()</refname> <refpurpose>Fetch newsgroup overview</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Client::getOverview</function></funcdef> <paramdef> string <parameter>$first</parameter> </paramdef> <paramdef> string <parameter>$last</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.getoverview.desc"> &title.desc; <para> Returns (a certain range of) the overview of the currently selected newsgroup. selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$first</parameter> - first article number, start of the range </para> </listitem> <listitem> <para> <parameter>$last</parameter> - last article number, end of the range</para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.return"> &title.returns; <para> <parameter>array</parameter> - a nested array indicated by the message id of the article, every entry contains the header as array <programlisting role="php"> $msgs[message_id][headername] = headercontent </programlisting> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.note"> &title.note; ¬e.notstatic; <warning> <para> Be careful with choosing the range. It could requires some time to get a huge number of message headers. </para> </warning> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.see"> &title.see; <para> <link linkend="package.networking.net-nntp.ancient.getoverviewformat"> <function>Net_NNTP_Client::getOverviewFormat</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.getoverview.example"> &title.example; <example> <title>Using <function>getOverview</function></title> <programlisting role="php"> <![CDATA[ ... $ret = $nntp->connect('news.php.net'); if( PEAR::isError($ret)) { // handle error } else { // print the last 10 messages $data = $nntp->selectGroup('php.pear.dev'); $msgs = $nntp->getOverview( $data['last'] - 10, $data[last]); foreach($msgs as $msg) { // print subjects echo $msg['subject'].'<br>'; } } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/last.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/last.xml +++ peardoc/en/package/networking/net-nntp/client/last.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.last"> <refnamediv> <refname>Net_NNTP_Client::last()</refname> <refpurpose>Get the number of the last article in the current newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP_Client::last</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.last.desc"> &title.desc; <para> Retrieves the number of the last article in the current newsgroup. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.last.return"> &title.returns; <para> <parameter>integer</parameter> - highest article number in newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.last.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.last.example"> &title.example; <example> <title>Using <function>last</function></title> <programlisting role="php"> <![CDATA[ ... $nntp->selectGroup("php.pear.dev"); echo "highest message number: ".$nntp->last(); ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/quit.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/quit.xml +++ peardoc/en/package/networking/net-nntp/client/quit.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.quit"> <refnamediv> <refname>Net_NNTP_Client::quit()</refname> <refpurpose>close the connection to the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>Net_NNTP_Client::quit</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.quit.desc"> &title.desc; <para> close the connection to the NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.quit.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.quit.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.connect"> <function>Net_NNTP_Client::connect</function></link>, </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/package/networking/net-nntp/client/selectgroup.xml?r=1.1&p=1 Index: peardoc/en/package/networking/net-nntp/client/selectgroup.xml +++ peardoc/en/package/networking/net-nntp/client/selectgroup.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.client.selectgroup"> <refnamediv> <refname>Net_NNTP_Client::selectGroup()</refname> <refpurpose>select a newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Client.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Client::selectGroup</function></funcdef> <paramdef> string <parameter>$newsgroup</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.client.selectgroup.desc"> &title.desc; <para> Selects a specific newsgroup on the NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> string <parameter>$newsgroup</parameter> - Name of the newsgroup to access </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.return"> &title.returns; <para> <parameter>array</parameter> - If the newsgroup exists, an array is returned: <table> <title></title> <tgroup cols="2"> <thead> <row> <entry>Key</entry> <entry>Value</entry> </row> </thead> <tbody> <row> <entry>'count'</entry> <entry>Number of articles in the group</entry> </row> <row> <entry>'first'</entry> <entry>The first article number in the group</entry> </row> <row> <entry>'last'</entry> <entry>The last article number in the group</entry> </row> <row> <entry>'group'</entry> <entry>Groupname</entry> </row> </tbody> </tgroup> </table> otherwise a <classname>PEAR_Error</classname> is returned on fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.throws"> &title.throws; <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="4"> <thead> <row> <entry>Error code</entry> <entry>Error message</entry> <entry>Reason</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry>&null;</entry> <entry> Different error messages </entry> <entry> The messages are directly passed from the news server, in the most cases caused by calling a non existing article </entry> <entry> </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.note"> &title.note; ¬e.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.see"> &title.see; <para> <link linkend="package.networking.net-nntp.client.connect"> <function>Net_NNTP_Client::connect</function> </link>, <link linkend="package.networking.net-nntp.ancient.getgroups"> <function>Net_NNTP_Client::getGroups</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.client.selectgroup.example"> &title.example; <example> <title>Using <function>selectGroup</function></title> <programlisting role="php"> <![CDATA[ ... $ret = $nntp->connect('news.php.net'); if( PEAR::isError($ret)) { // handle error } else { // success $data = $nntp->selectGroup('php.pear.dev'); // Print the count of articles echo "Count: ", $data['last'] - $data['first']; } ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->