cvs: peardoc /en/package/networking/net-nntp/realtime count.xml getgroups.xml getoverview.xml

From: Date: Wed, 22 Oct 2003 18:18:28 +0000
Subject: cvs: peardoc /en/package/networking/net-nntp/realtime count.xml getgroups.xml getoverview.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-1724@lists.php.net to get a copy of this message
heino Wed Oct 22 14:18:28 2003 EDT Added files: /peardoc/en/package/networking/net-nntp/realtime count.xml getgroups.xml getoverview.xml Log: Initial revision

Index: peardoc/en/package/networking/net-nntp/realtime/count.xml +++ peardoc/en/package/networking/net-nntp/realtime/count.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.realtime.count"> <refnamediv> <refname>Net_NNTP_Realtime::count()</refname> <refpurpose>Get the number of articles in the current newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP_Realtime::count</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.realtime.count.desc"> &title.desc; <para> Retrieves the number of articles in the current newsgroup. </para> </refsect1> <refsect1 id="package.networking.net-nntp.realtime.count.return"> &title.returns; <para> <parameter>integer</parameter> - number of articles in newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.realtime.count.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.realtime.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 --> Index: peardoc/en/package/networking/net-nntp/realtime/getgroups.xml +++ peardoc/en/package/networking/net-nntp/realtime/getgroups.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.realtime.getgroups"> <refnamediv> <refname>Net_NNTP_Realtime::getGroups()</refname> <refpurpose>Fetch list of avaible newsgroups</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Realtime::getGroups</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.realtime.getgroups.desc"> &title.desc; <para> Returns a list of all avaible newsgroups </para> </refsect1> <refsect1 id="package.networking.net-nntp.realtime.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.realtime.getgroups.note"> &title.note; &note.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.realtime.getgroups.see"> &title.see; <para> <link linkend="package.networking.net-nntp.realtime.selectgroup"> <function>Net_NNTP_Realtime::selectGroup</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.realtime.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 --> Index: peardoc/en/package/networking/net-nntp/realtime/getoverview.xml +++ peardoc/en/package/networking/net-nntp/realtime/getoverview.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.realtime.getoverview"> <refnamediv> <refname>Net_NNTP_Realtime::getOverview()</refname> <refpurpose>Fetch newsgroup overview</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Realtime::getOverview</function></funcdef> <paramdef> string <parameter>$first</parameter> </paramdef> <paramdef> string <parameter>$last</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.realtime.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.realtime.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.realtime.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.realtime.getoverview.note"> &title.note; &note.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.realtime.getoverview.see"> &title.see; <para> <link linkend="package.networking.net-nntp.realtime.getoverviewformat"> <function>Net_NNTP_Realtime::getOverviewFormat</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.realtime.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 -->
« previous php.pear.doc (#1724) next »