cvs: peardoc /en/package/networking/net-nntp connectauthenticated.xml first.xml getarticleraw.xml getbodyraw.xml getdate.xml getheaderraw.xml last.xml

From: Date: Tue, 26 Aug 2003 08:57:17 +0000
Subject: cvs: peardoc /en/package/networking/net-nntp connectauthenticated.xml first.xml getarticleraw.xml getbodyraw.xml getdate.xml getheaderraw.xml last.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-1408@lists.php.net to get a copy of this message
heino Tue Aug 26 04:57:17 2003 EDT Added files: /peardoc/en/package/networking/net-nntp connectauthenticated.xml first.xml getarticleraw.xml getbodyraw.xml getdate.xml getheaderraw.xml last.xml Log: Addition of new methods

Index: peardoc/en/package/networking/net-nntp/connectauthenticated.xml +++ peardoc/en/package/networking/net-nntp/connectauthenticated.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.connect"> <refnamediv> <refname>Net_NNTP::connect()</refname> <refpurpose>Connects and authenticates to a newsserver</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>boolean <function>Net_NNTP::connectAuthenticated</function></funcdef> <paramdef>string <parameter>$nntpserver</parameter></paramdef> <paramdef> integer <parameter><optional>$port = 119</optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$user = &null;</optional></parameter> </paramdef> <paramdef> integer <parameter><optional>$pass = &null;</optional></parameter> </paramdef> <paramdef> integer <parameter> <optional>$authmode = NET_NNTP_AUTHORIGINAL</optional> </parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.connectauthenticated.desc"> &title.desc; <para> Connect and authenticate to a specific newsserver </para> </refsect1> <refsect1 id="package.networking.net-nntp.connectauthenticated.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>$nntpserver</parameter> - Name of the newsserver to connect </para> </listitem> <listitem> <para> <parameter>$port</parameter> - Port, where the newsserver listens </para> </listitem> <listitem> <para> <parameter>$user</parameter> - Username to authenticate </para> </listitem> <listitem> <para> <parameter>$pass</parameter> - Password to authenticate </para> </listitem> <listitem> <para> <parameter>$authmode</parameter> - Type of authentication, at the moment only <link linkend= "package.networking.net-nntp.constants.net-nntp-authoriginal"> <constant>NET_NNTP_AUTHORIGINAL</constant></link> </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-nntp.connectauthenticated.return"> &title.returns; <para> <parameter>boolean</parameter> - &return.success-pearerror; </para> </refsect1> <refsect1 id="package.networking.net-nntp.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.connectauthenticated.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.connectauthenticated.see"> &title.see; <para> <link linkend="package.networking.net-nntp.connect"> <function>Net_NNTP::connect</function></link> <link linkend="package.networking.net-nntp.quit"> <function>Net_NNTP::quit</function></link>, </para> </refsect1> <refsect1 id="package.networking.net-nntp.connectauthenticated.example"> &title.example; <example> <title>Using <function>connectauthenticated</function></title> <programlisting role="php"> <![CDATA[ require_once "Net/NNTP.php"; $nntp = new Net_NNTP; $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/first.xml +++ peardoc/en/package/networking/net-nntp/first.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.first"> <refnamediv> <refname>Net_NNTP::first()</refname> <refpurpose>get lowest message number</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP::first</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.first.desc"> &title.desc; <para> Retrieves the lowest message number in the current selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.first.return"> &title.returns; <para> <parameter>integer</parameter> - lowest message number </para> </refsect1> <refsect1 id="package.networking.net-nntp.first.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.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/getarticleraw.xml +++ peardoc/en/package/networking/net-nntp/getarticleraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.getarticleraw"> <refnamediv> <refname>Net_NNTP::getArticleRaw()</refname> <refpurpose>fetch an article from a new server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_NNTP::getArticleRaw</function></funcdef> <paramdef> string <parameter>$articleId</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.getarticleraw.desc"> &title.desc; <para> Returns the whole article from the current selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.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.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.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.isconnected"> <function>Net_NNTP::isConnected</function></link>) </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.getarticleraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.getarticleraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp.getheaderraw"> <function>Net_NNTP::getHeadersRaw</function> </link>, <link linkend="package.networking.net-nntp.getbodyraw"> <function>Net_NNTP::getBodyRaw</function> </link>, <link linkend="package.networking.net-nntp.getoverview"> <function>Net_NNTP::getOverview</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.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/getbodyraw.xml +++ peardoc/en/package/networking/net-nntp/getbodyraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.getbodyraw"> <refnamediv> <refname>Net_NNTP::getBodyRaw()</refname> <refpurpose>fetch the body of an article</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>string <function>Net_NNTP::getBodyRaw</function></funcdef> <paramdef> string <parameter>$articleId</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.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.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.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.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.isconnected"> <function>Net_NNTP::isConnected</function></link>) </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.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.getbodyraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp.getheaderraw"> <function>Net_NNTP::getHeaderRaw</function> </link>, <link linkend="package.networking.net-nntp.splitheaders"> <function>Net_NNTP::splitHeaders</function> </link>, <link linkend="package.networking.net-nntp.getarticleraw"> <function>Net_NNTP::getArticleRaw</function> </link>, <link linkend="package.networking.net-nntp.getoverview"> <function>Net_NNTP::getOverview</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.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/getdate.xml +++ peardoc/en/package/networking/net-nntp/getdate.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.getdate"> <refnamediv> <refname>Net_NNTP::getDate()</refname> <refpurpose>get date from news server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>array <function>Net_NNTP::getDate</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.getDate.desc"> &title.desc; <para> Retrieves the date from the news server </para> </refsect1> <refsect1 id="package.networking.net-nntp.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.getdate.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.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/getheaderraw.xml +++ peardoc/en/package/networking/net-nntp/getheaderraw.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.getheaderraw"> <refnamediv> <refname>Net_NNTP::getHeaderRaw()</refname> <refpurpose>fetch message header</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>string <function>Net_NNTP::getHeaderRaw</function></funcdef> <paramdef> string <parameter>$articleId</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.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.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.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.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.isconnected"> <function>Net_NNTP::isConnected</function></link>) </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-nntp.getheaderraw.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.getheaderraw.see"> &title.see; <para> <link linkend="package.networking.net-nntp.splitheaders"> <function>Net_NNTP::splitHeaders</function> </link>, <link linkend="package.networking.net-nntp.getbodyraw"> <function>Net_NNTP::getBodyRaw</function> </link>, <link linkend="package.networking.net-nntp.getoverview"> <function>Net_NNTP::getOverview</function> </link> </para> </refsect1> <refsect1 id="package.networking.net-nntp.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/last.xml +++ peardoc/en/package/networking/net-nntp/last.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-nntp.last"> <refnamediv> <refname>Net_NNTP::last()</refname> <refpurpose>get highest message number</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/NNTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>integer <function>Net_NNTP::last</function></funcdef> <paramdef> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-nntp.last.desc"> &title.desc; <para> Retrieves the highest message number in the current selected newsgroup </para> </refsect1> <refsect1 id="package.networking.net-nntp.last.return"> &title.returns; <para> <parameter>integer</parameter> - highest message number </para> </refsect1> <refsect1 id="package.networking.net-nntp.last.note"> &title.note; <para> <emphasis>since</emphasis> 0.3 </para> &note.notstatic; </refsect1> <refsect1 id="package.networking.net-nntp.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 -->
« previous php.pear.doc (#1408) next »