cvs: peardoc /en/package/networking/net-nntp/realtime connect.xml connectauthenticated.xml constants.xml first.xml getarticleraw.xml getbodyraw.xml
getdate.xml getheaderraw.xml last.xml quit.xml selectgroup.xml

From: Date: Sat, 11 Oct 2003 18:36:14 +0000
Subject: cvs: peardoc /en/package/networking/net-nntp/realtime connect.xml connectauthenticated.xml constants.xml first.xml getarticleraw.xml getbodyraw.xml
getdate.xml getheaderraw.xml last.xml quit.xml selectgroup.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-1617@lists.php.net to get a copy of this message
heino Sat Oct 11 14:36:14 2003 EDT Added files: /peardoc/en/package/networking/net-nntp/realtime connect.xml connectauthenticated.xml constants.xml first.xml getarticleraw.xml getbodyraw.xml getdate.xml getheaderraw.xml last.xml quit.xml selectgroup.xml Log: Copied from '../' (ids etc. has been modified to reflect new location)

Index: peardoc/en/package/networking/net-nntp/realtime/connect.xml +++ peardoc/en/package/networking/net-nntp/realtime/connect.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp-realtime.connect"> <refnamediv> <refname>Net_NNTP_Realtime::connect()</refname> <refpurpose>Connects to a NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Net_NNTP_Realtime::connect</function></funcdef> <paramdef>string <parameter>$host = NET_NNTP_PROTOCOL_DEFAULT_HOST</parameter></paramdef> <paramdef> integer <parameter><optional>$port = NET_NNTP_PROTOCOL_DEFAULT_PORT</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp-realtime.connect.desc"> &title.desc; <para> Connect to a specific NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.connect.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$host</parameter> - Hostname of the NNTP-server </para> </listitem> <listitem> <para> <parameter>$port</parameter> - Port, where the NNTP-server listens </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.connect.return"> &title.returns; <para> <parameter>boolean</parameter> - &return.success-pearerror; </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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 server name or adress</simpara> </listitem> <listitem> <simpara>the host itself isn't link to a network</simpara> </listitem> <listitem> <simpara>a firewall doesn't allow an 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-realtime.connect.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp-realtime.connect.see"> &title.see; <para> <link linkend="package.networking.net-nntp-realtime.quit"> <function>Net_NNTP::quit</function></link>, <link linkend="package.networking.net-nntp-realtime.prepareconnection"> <function>Net_NNTP::pepareConnection</function></link> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.connect.example"> &title.example; <example> <title>Using <function>connect</function></title> <programlisting role="php"> <![CDATA[ require_once 'Net/NNTP/Realtime.php'; $nntp = new Net_NNTP_Realtime; $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 --> Index: peardoc/en/package/networking/net-nntp/realtime/connectauthenticated.xml +++ peardoc/en/package/networking/net-nntp/realtime/connectauthenticated.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp-realtime.connectauthenticated"> <refnamediv> <refname>Net_NNTP_Realtime::connectAuthenticated()</refname> <refpurpose>Connects and authenticates to a newsserver</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Net_NNTP_Realtime::connectAuthenticated</function></funcdef> <paramdef> integer <parameter><optional>$user = &null;</optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$pass = &null;</optional></parameter> </paramdef> <paramdef>string <parameter>$host = NET_NNTP_PROTOCOL_DEFAULT_HOST</parameter></paramdef> <paramdef> integer <parameter><optional>$port = NET_NNTP_PROTOCOL_DEFAULT_PORT</optional></parameter> </paramdef> <paramdef> integer <parameter> <optional>$authmode = NET_NNTP_AUTHORIGINAL</optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp-realtime.connectauthenticated.desc"> &title.desc; <para> Connect and authenticate to a specific newsserver </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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 </para> </listitem> <listitem> <para> <parameter>$port</parameter> - Port, where the newsserver listens </para> </listitem> <listitem> <para> <parameter>$authmode</parameter> - Type of authentication, at the moment only <link linkend= "package.networking.net-nntp-realtime.constants.net-nntp-authoriginal"> <constant>NET_NNTP_AUTHORIGINAL</constant></link> </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.connectauthenticated.return"> &title.returns; <para> <parameter>boolean</parameter> - &return.success-pearerror; </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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 $nntpserver" </parameter> or <parameter>"Not connected"</parameter> </entry> <entry> The connection couldn't be established because <itemizedlist> <listitem> <simpara>wrong server name or adress</simpara> </listitem> <listitem> <simpara>the host itself isn't link to a network</simpara> </listitem> <listitem> <simpara>a firewall doesn't allow an 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-realtime.connectauthenticated.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp-realtime.connectauthenticated.see"> &title.see; <para> <link linkend="package.networking.net-nntp-realtime.connect"> <function>Net_NNTP_Realtime::connect</function></link> <link linkend="package.networking.net-nntp-realtime.quit"> <function>Net_NNTP_Realtime::quit</function></link>, </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.connectauthenticated.example"> &title.example; <example> <title>Using <function>connectauthenticated</function></title> <programlisting role="php"> <![CDATA[ require_once 'Net/NNTP/Realtime.php'; $nntp = new Net_NNTP_Realtime; $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 --> Index: peardoc/en/package/networking/net-nntp/realtime/constants.xml +++ peardoc/en/package/networking/net-nntp/realtime/constants.xml <refentry id="package.networking.net-nntp-realtime.constants"> <refnamediv> <refname>&title.constants;</refname> <refpurpose>&purpose.preconstants;</refpurpose> </refnamediv> <refsect1 id="package.networking.net-nntp-realtime.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-realtime.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-realtime.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-realtime.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-realtime.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 --> Index: peardoc/en/package/networking/net-nntp/realtime/first.xml +++ peardoc/en/package/networking/net-nntp/realtime/first.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp-realtime.first"> <refnamediv> <refname>Net_NNTP_Realtime::first()</refname> <refpurpose>get lowest message number</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP_Realtime::first</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp-realtime.first.desc"> &title.desc; <para> Retrieves the lowest message number in the current selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.first.return"> &title.returns; <para> <parameter>integer</parameter> - lowest message number </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.first.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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 --> Index: peardoc/en/package/networking/net-nntp/realtime/getarticleraw.xml +++ peardoc/en/package/networking/net-nntp/realtime/getarticleraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp-realtime.getarticleraw"> <refnamediv> <refname>Net_NNTP_Realtime::getArticleRaw()</refname> <refpurpose>fetch an article from a new server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP_Realtime::getArticleRaw</function></funcdef> <paramdef> string <parameter>$articleId</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp-realtime.getarticleraw.desc"> &title.desc; <para> Returns the whole article from the current selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getarticleraw.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $articleID</parameter> - Message-ID of the message number to fetch </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getarticleraw.return"> &title.returns; <para> <parameter>string</parameter> - If message exists the message as string or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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> Check the article ID or if your are still connected to the server (<link linkend="package.networking.net-nntp-realtime.isconnected"> <function>Net_NNTP_Realtime::isConnected</function></link>) </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getarticleraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getarticleraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp-realtime.getheaderraw"> <function>Net_NNTP_Realtime::getHeadersRaw</function> </link>, <link linkend="package.networking.net-nntp-realtime.getbodyraw"> <function>Net_NNTP_Realtime::getBodyRaw</function> </link>, </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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 --> Index: peardoc/en/package/networking/net-nntp/realtime/getbodyraw.xml +++ peardoc/en/package/networking/net-nntp/realtime/getbodyraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp-realtime.getbodyraw"> <refnamediv> <refname>Net_NNTP_Realtime::getBodyRaw()</refname> <refpurpose>fetch the body of an article</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>string <function>Net_NNTP_Realtime::getBodyRaw</function></funcdef> <paramdef> string <parameter>$articleId</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp-realtime.getbodyraw.desc"> &title.desc; <para> Returns the whole body of an article in the current selected newsgroup from the webserver </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getbodyraw.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> string <parameter>$articleId</parameter> - Message-ID or Message number </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getbodyraw.return"> &title.returns; <para> <parameter>string</parameter> - If message exists the body as string or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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> Check the article ID or if your are still connected to the server (<link linkend="package.networking.net-nntp-realtime.isconnected"> <function>Net_NNTP_Realtime::isConnected</function></link>) </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getbodyraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.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-realtime.getbodyraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp-realtime.getheaderraw"> <function>Net_NNTP_Realtime::getHeaderRaw</function> </link>, <link linkend="package.networking.net-nntp-realtime.splitheaders"> <function>Net_NNTP_Realtime::splitHeaders</function> </link>, <link linkend="package.networking.net-nntp-realtime.getarticleraw"> <function>Net_NNTP_Realtime::getArticleRaw</function> </link>, <link linkend="package.networking.net-nntp-realtime.getoverview"> <function>Net_NNTP_Realtime::getOverview</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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 --> Index: peardoc/en/package/networking/net-nntp/realtime/getdate.xml +++ peardoc/en/package/networking/net-nntp/realtime/getdate.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp-realtime.getdate"> <refnamediv> <refname>Net_NNTP_Realtime::getDate()</refname> <refpurpose>get date from news server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Realtime::getDate</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp-realtime.getDate.desc"> &title.desc; <para> Retrieves the date from the news server </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getdate.return"> &title.returns; <para> <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> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getdate.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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 --> Index: peardoc/en/package/networking/net-nntp/realtime/getheaderraw.xml +++ peardoc/en/package/networking/net-nntp/realtime/getheaderraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp-realtime.getheaderraw"> <refnamediv> <refname>Net_NNTP_Realtime::getHeaderRaw()</refname> <refpurpose>fetch message header</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>string <function>Net_NNTP_Realtime::getHeaderRaw</function></funcdef> <paramdef> string <parameter>$articleId</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp-realtime.getheaderraw.desc"> &title.desc; <para> Returns all avaible header lines of a specified message in the current selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getheaderraw.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> string <parameter>$articleId</parameter> - Message-ID or Message number </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getheaderraw.return"> &title.returns; <para> <parameter>string</parameter> - If message exists the header as string or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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> Check the article ID or if your are still connected to the server (<link linkend="package.networking.net-nntp-realtime.isconnected"> <function>Net_NNTP_Realtime::isConnected</function></link>) </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getheaderraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp-realtime.getheaderraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp-realtime.splitheaders"> <function>Net_NNTP_Realtime::splitHeaders</function> </link>, <link linkend="package.networking.net-nntp-realtime.getbodyraw"> <function>Net_NNTP_Realtime::getBodyRaw</function> </link>, <link linkend="package.networking.net-nntp-realtime.getoverview"> <function>Net_NNTP_Realtime::getOverview</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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 --> Index: peardoc/en/package/networking/net-nntp/realtime/last.xml +++ peardoc/en/package/networking/net-nntp/realtime/last.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.realtime.realtime.last"> <refnamediv> <refname>Net_NNTP_Realtime::last()</refname> <refpurpose>get highest message number</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP_Realtime::last</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.realtime.realtime.last.desc"> &title.desc; <para> Retrieves the highest message number in the current selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.realtime.last.return"> &title.returns; <para> <parameter>integer</parameter> - highest message number </para> </refsect1> <refsect1 id="package.networking.net-nntp.realtime.last.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.realtime.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 --> Index: peardoc/en/package/networking/net-nntp/realtime/quit.xml +++ peardoc/en/package/networking/net-nntp/realtime/quit.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp-realtime.quit"> <refnamediv> <refname>Net_NNTP::quit()</refname> <refpurpose>close the connection to the NNTP-server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>void <function>Net_NNTP_Realtime::quit</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp-realtime.quit.desc"> &title.desc; <para> close the connection to the NNTP-server </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.quit.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp-realtime.quit.see"> &title.see; <para> <link linkend="package.networking.net-nntp-realtime.connect"> <function>Net_NNTP_Realtime::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 --> Index: peardoc/en/package/networking/net-nntp/realtime/selectgroup.xml +++ peardoc/en/package/networking/net-nntp/realtime/selectgroup.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp-realtime.selectgroup"> <refnamediv> <refname>Net_NNTP_Realtime::selectGroup()</refname> <refpurpose>select a newsgroup</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP/Realtime.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP_Realtime::selectGroup</function></funcdef> <paramdef> string <parameter>$newsgroup</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp-realtime.selectgroup.desc"> &title.desc; <para> Selects a specific newsgroup on the news server </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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-realtime.selectgroup.return"> &title.returns; <para> <parameter>array</parameter> - If the newsgroup exists an array containing the message number of the first (array key: <parameter>['first']</parameter>) and the last message id (array key: <parameter>['last']</parameter>) or a <classname>PEAR_Error</classname>, if fail. </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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> Check the article ID or if your are still connected to the server (<link linkend="package.networking.net-nntp-realtime.isconnected"> <function>Net_NNTP_Realtime::isConnected</function></link>) </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.selectgroup.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp-realtime.selectgroup.see"> &title.see; <para> <link linkend="package.networking.net-nntp-realtime.connect"> <function>Net_NNTP_Realtime::connect</function> </link>, <link linkend="package.networking.net-nntp-realtime.getgroups"> <function>Net_NNTP_Realtime::getGroups</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp-realtime.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 -->
« previous php.pear.doc (#1617) next »