cvs: pearweb /public_html/manual contributing-introducing.php contributing-requirements.php contributing.php index.php packages.auth.auth.php
packages.auth.auth_http.php packages.auth.php packages.networking.net_checkip.php packages.networking.net_portscan.php packages.networking.php
packages.php packages.skeleton.php standards.cvs.php standards.header.php
| From: | Martin Jansen | Date: | Fri, 16 Nov 2001 21:41:54 +0000 |
| Subject: | cvs: pearweb /public_html/manual contributing-introducing.php contributing-requirements.php contributing.php index.php packages.auth.auth.php packages.auth.auth_http.php packages.auth.php packages.networking.net_checkip.php packages.networking.net_portscan.php packages.networking.php packages.php packages.skeleton.php standards.cvs.php standards.header.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1349@lists.php.net to get a copy of this message | ||
mj Fri Nov 16 16:41:54 2001 EDT
Added files:
/pearweb/public_html/manual packages.auth.auth_http.php
packages.networking.net_checkip.php
packages.networking.net_portscan.php
packages.networking.php
Modified files:
/pearweb/public_html/manual contributing-introducing.php
contributing-requirements.php
contributing.php index.php
packages.auth.auth.php
packages.auth.php packages.php
packages.skeleton.php standards.cvs.php
standards.header.php
Log:
* Manual update: Massive structure improvement.
Index: pearweb/public_html/manual/contributing-introducing.php diff -u pearweb/public_html/manual/contributing-introducing.php:1.3 pearweb/public_html/manual/contributing-introducing.php:1.4 --- pearweb/public_html/manual/contributing-introducing.php:1.3 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/contributing-introducing.php Fri Nov 16 16:41:54 2001 @@ -7,7 +7,7 @@ 'up' => array('contributing-howto.php', 'How to contribute to PEAR'), 'toc' => array( array('contributing-howto.php#contributing-howto', ''), - array('contributing-howto.php#AEN529', ''), + array('contributing-howto.php#AEN559', ''), array('contributing-howto.php#contributing-introduction', 'Introduction'), array('contributing-requirements.php', 'Requirements'), array('contributing-introducing.php', 'Introducing your code')))); Index: pearweb/public_html/manual/contributing-requirements.php diff -u pearweb/public_html/manual/contributing-requirements.php:1.3 pearweb/public_html/manual/contributing-requirements.php:1.4 --- pearweb/public_html/manual/contributing-requirements.php:1.3 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/contributing-requirements.php Fri Nov 16 16:41:54 2001 @@ -7,7 +7,7 @@ 'up' => array('contributing-howto.php', 'How to contribute to PEAR'), 'toc' => array( array('contributing-howto.php#contributing-howto', ''), - array('contributing-howto.php#AEN529', ''), + array('contributing-howto.php#AEN559', ''), array('contributing-howto.php#contributing-introduction', 'Introduction'), array('contributing-requirements.php', 'Requirements'), array('contributing-introducing.php', 'Introducing your code')))); Index: pearweb/public_html/manual/contributing.php diff -u pearweb/public_html/manual/contributing.php:1.3 pearweb/public_html/manual/contributing.php:1.4 --- pearweb/public_html/manual/contributing.php:1.3 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/contributing.php Fri Nov 16 16:41:54 2001 @@ -2,7 +2,7 @@ sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), - 'prev' => array('packages.net_portscan.net_portscan.php', 'Net_Portscan'), + 'prev' => array('packages.networking.net_portscan.php', 'Net_Portscan'), 'next' => array('contributing-howto.php', 'How to contribute to PEAR'), 'up' => array('index.php', 'PEAR Manual'), 'toc' => array( Index: pearweb/public_html/manual/index.php diff -u pearweb/public_html/manual/index.php:1.5 pearweb/public_html/manual/index.php:1.6 --- pearweb/public_html/manual/index.php:1.5 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/index.php Fri Nov 16 16:41:54 2001 @@ -92,17 +92,12 @@ ><DT >II. <A HREF="packages.auth.php" ->Auth</A -></DT -><DT -><A -HREF="packages.net_checkip.php" ->Net_CheckIP: Validation of IPv4 adresses</A +>Authentication</A ></DT ><DT >III. <A -HREF="packages.net_portscan.php" ->Net_Portscan</A +HREF="packages.networking.php" +>Networking</A ></DT ></DL ></DD Index: pearweb/public_html/manual/packages.auth.auth.php diff -u pearweb/public_html/manual/packages.auth.auth.php:1.1 pearweb/public_html/manual/packages.auth.auth.php:1.2 --- pearweb/public_html/manual/packages.auth.auth.php:1.1 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.auth.auth.php Fri Nov 16 16:41:54 2001 @@ -2,13 +2,14 @@ sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), - 'prev' => array('packages.auth.php', 'Auth'), - 'next' => array('packages.net_checkip.php', ''), - 'up' => array('packages.auth.php', 'Auth'), + 'prev' => array('packages.auth.php', 'Authentication'), + 'next' => array('packages.auth.auth_http.php', 'Auth_HTTP'), + 'up' => array('packages.auth.php', 'Authentication'), 'toc' => array( array('packages.auth.php#packages.Auth', ''), array('packages.auth.php#AEN417', ''), - array('packages.auth.auth.php', 'Auth')))); + array('packages.auth.auth.php', 'Auth'), + array('packages.auth.auth_http.php', 'Auth_HTTP')))); manualHeader('Auth','packages.auth.auth.php'); ?><H1 ><A @@ -92,7 +93,7 @@ ><TD ><PRE CLASS="programlisting" -> require_once "Auth.php"; +> require_once "Auth/Auth.php"; function myOutput($username, $status) { @@ -121,6 +122,73 @@ ></TD ></TR ></TABLE +><TABLE +WIDTH="100%" +BORDER="0" +CELLPADDING="0" +CELLSPACING="0" +CLASS="EXAMPLE" +><TR +><TD +><DIV +CLASS="example" +><A +NAME="AEN439" +></A +><P +><B +>Example 2. Using different DB parameters</B +></P +><TABLE +BORDER="0" +BGCOLOR="#E0E0E0" +WIDTH="100%" +><TR +><TD +><PRE +CLASS="programlisting" +> require_once "Auth/Auth.php"; + +function myOutput($username, $status) +{ + ... /** See example 1 for the full listing */ +} + +$params = array( + "dsn" => "mysql://martin:test@localhost/auth", + "table" => "myAuth", + "usernamecol" => "myUserColumn", + "passwordcol" => "myPasswordColumn" + ); + +$a = new Auth("DB", $params, "myOutput"); + +$a->start(); + +if ($a->getAuth()) { + echo "You have been authenticated successfully."; +} + </PRE +></TD +></TR +></TABLE +></DIV +></TD +></TR +></TABLE +><P +> This example shows you, how you can specifiy alternative + names for the database table and the column names. In our + example, we use the table myAuth, select the username from + the field myUserColumn and the password from the field + myPasswordColumn. The Default values for this fields are + auth, username and password. + </P +><P +> This feature is necessary if you want to use PEAR::Auth + with a database layout that is different from the one, + PEAR::Auth uses by default. + </P ></DIV ><DIV CLASS="refsect1" @@ -132,7 +200,7 @@ ><DIV CLASS="funcsynopsis" ><A -NAME="AEN441" +NAME="AEN446" ></A ><P ></P @@ -163,7 +231,7 @@ ><DIV CLASS="funcsynopsis" ><A -NAME="AEN449" +NAME="AEN454" ></A ><P ></P Index: pearweb/public_html/manual/packages.auth.php diff -u pearweb/public_html/manual/packages.auth.php:1.4 pearweb/public_html/manual/packages.auth.php:1.5 --- pearweb/public_html/manual/packages.auth.php:1.4 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/packages.auth.php Fri Nov 16 16:41:54 2001 @@ -7,11 +7,9 @@ 'up' => array('packages.php', 'PEAR Packages'), 'toc' => array( array('packages.php#packages', ''), - array('packages.auth.php', 'Auth'), - array('packages.php#AEN0', ''), - array('packages.net_checkip.php', ''), - array('packages.net_portscan.php', 'Net_Portscan')))); -manualHeader('Auth','packages.auth.php'); + array('packages.auth.php', 'Authentication'), + array('packages.networking.php', 'Networking')))); +manualHeader('Authentication','packages.auth.php'); ?><DIV CLASS="reference" ><A @@ -21,7 +19,7 @@ CLASS="TITLEPAGE" ><H1 CLASS="title" ->II. Auth</H1 +>II. Authentication</H1 ><DIV CLASS="PARTINTRO" ><A @@ -49,9 +47,19 @@ > — PHP based authentication systems. </DT +><DT +><A +HREF="packages.auth.auth_http.php" +><B +CLASS="classname" +>Auth_HTTP</B +></A +> — + HTTP authentication with PHP. + </DT ></DL ></DIV ></DIV ></DIV -><?php manualFooter('Auth','packages.auth.php'); +><?php manualFooter('Authentication','packages.auth.php'); ?> Index: pearweb/public_html/manual/packages.php diff -u pearweb/public_html/manual/packages.php:1.4 pearweb/public_html/manual/packages.php:1.5 --- pearweb/public_html/manual/packages.php:1.4 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/packages.php Fri Nov 16 16:41:54 2001 @@ -3,7 +3,7 @@ setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('class.pear-error.php', 'PEAR_Error'), - 'next' => array('packages.auth.php', 'Auth'), + 'next' => array('packages.auth.php', 'Authentication'), 'up' => array('index.php', 'PEAR Manual'), 'toc' => array( array('index.php#manual', ''), @@ -35,17 +35,12 @@ ><DT >II. <A HREF="packages.auth.php" ->Auth</A -></DT -><DT -><A -HREF="packages.net_checkip.php" ->Net_CheckIP: Validation of IPv4 adresses</A +>Authentication</A ></DT ><DT >III. <A -HREF="packages.net_portscan.php" ->Net_Portscan</A +HREF="packages.networking.php" +>Networking</A ></DT ></DL ></DIV Index: pearweb/public_html/manual/packages.skeleton.php diff -u pearweb/public_html/manual/packages.skeleton.php:1.5 pearweb/public_html/manual/packages.skeleton.php:1.6 --- pearweb/public_html/manual/packages.skeleton.php:1.5 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/packages.skeleton.php Fri Nov 16 16:41:54 2001 @@ -19,7 +19,7 @@ ><H1 CLASS="title" ><A -NAME="AEN561" +NAME="AEN591" >Skeleton for creating PEAR docbook documentation</A ></H1 ><HR></DIV Index: pearweb/public_html/manual/standards.cvs.php diff -u pearweb/public_html/manual/standards.cvs.php:1.5 pearweb/public_html/manual/standards.cvs.php:1.6 --- pearweb/public_html/manual/standards.cvs.php:1.5 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/standards.cvs.php Fri Nov 16 16:41:54 2001 @@ -32,7 +32,7 @@ > This section applies only to packages using CVS at cvs.php.net. </P ><P -> Include the $Id: standards.cvs.php,v 1.5 2001/11/15 20:57:43 mj Exp $ CVS keyword in each file. As each file +> Include the $Id: standards.cvs.php,v 1.6 2001/11/16 21:41:54 mj Exp $ CVS keyword in each file. As each file is edited, add this tag if it's not yet present (or replace existing forms such as "Last Modified:", etc.). Index: pearweb/public_html/manual/standards.header.php diff -u pearweb/public_html/manual/standards.header.php:1.5 pearweb/public_html/manual/standards.header.php:1.6 --- pearweb/public_html/manual/standards.header.php:1.5 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/standards.header.php Fri Nov 16 16:41:54 2001 @@ -57,7 +57,7 @@ // | Your Name <you@example.com> | // +----------------------------------------------------------------------+ // -// $Id: standards.header.php,v 1.5 2001/11/15 20:57:43 mj Exp $ +// $Id: standards.header.php,v 1.6 2001/11/16 21:41:54 mj Exp $ </PRE ></TD ></TR Index: pearweb/public_html/manual/packages.auth.auth_http.php +++ pearweb/public_html/manual/packages.auth.auth_http.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.auth.auth.php', 'Auth'), 'next' => array('packages.networking.php', 'Networking'), 'up' => array('packages.auth.php', 'Authentication'), 'toc' => array( array('packages.auth.php#packages.Auth', ''), array('packages.auth.php#AEN417', ''), array('packages.auth.auth.php', 'Auth'), array('packages.auth.auth_http.php', 'Auth_HTTP')))); manualHeader('Auth_HTTP','packages.auth.auth_http.php'); ?><H1 ><A NAME="packages.Auth.Auth_HTTP" ><B CLASS="classname" >Auth_HTTP</B ></A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN464" ></A ><B CLASS="classname" >Auth_HTTP</B > -- HTTP authentication with PHP. </DIV ><DIV CLASS="refsect1" ><A NAME="packages.Auth.Auth_HTTP.Auth_HTTP" ></A ><H2 >Auth_HTTP::Auth_HTTP</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN470" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" ><B CLASS="function" >Auth::Auth</B ></CODE > (string storageDriver, mixed options)</CODE ></P ><P ></P ></DIV ><P > Constructor for the authencation system. The first parameter is the name of the storage driver, that should be used. The second parameter can either be a string containing some login information or an array containing a bunch of options for the storage driver. </P ><P > For more information on usage of the constructor parameters, please refer to the documentation of PEAR::Auth. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN479" ></A ><P ><B >Example 1. Simple usage example</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > require_once "Auth_HTTP/Auth_HTTP.php"; $a = new Auth_HTTP("DB", "mysql://test:test@localhost/test"); $a->start(); </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><?php manualFooter('Auth_HTTP','packages.auth.auth_http.php'); ?> Index: pearweb/public_html/manual/packages.networking.net_checkip.php +++ pearweb/public_html/manual/packages.networking.net_checkip.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.networking.php', 'Networking'), 'next' => array('packages.networking.net_portscan.php', 'Net_Portscan'), 'up' => array('packages.networking.php', 'Networking'), 'toc' => array( array('packages.networking.php#packages.Networking', ''), array('packages.networking.php#AEN484', ''), array('packages.networking.net_checkip.php', 'Net_CheckIP'), array('packages.networking.net_portscan.php', 'Net_Portscan')))); manualHeader('Net_CheckIP','packages.networking.net_checkip.php'); ?><H1 ><A NAME="packages.Networking.Net_CheckIP" ><B CLASS="classname" >Net_CheckIP</B ></A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN487" ></A ><B CLASS="classname" >Net_CheckIP</B > -- Validation of IPv4 adresses </DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_CheckIP.check_ip" ></A ><H2 >Net_Portscan::checkPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN493" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >boolean <B CLASS="function" >Net_CheckIP::check_ip</B ></CODE > (string ip)</CODE ></P ><P ></P ></DIV ><P > This function can validate if a given string has a valid IPv4 syntax. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN500" ></A ><P ><B >Example 1. Using checkPort</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > require_once "Net_CheckIP/CheckIP.php"; if (Net_CheckIP::check_ip("your_ip_goes_here")) { // Syntax of the IP is ok } </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><?php manualFooter('Net_CheckIP','packages.networking.net_checkip.php'); ?> Index: pearweb/public_html/manual/packages.networking.net_portscan.php +++ pearweb/public_html/manual/packages.networking.net_portscan.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.networking.net_checkip.php', 'Net_CheckIP'), 'next' => array('contributing.php', 'Contributing to PEAR'), 'up' => array('packages.networking.php', 'Networking'), 'toc' => array( array('packages.networking.php#packages.Networking', ''), array('packages.networking.php#AEN484', ''), array('packages.networking.net_checkip.php', 'Net_CheckIP'), array('packages.networking.net_portscan.php', 'Net_Portscan')))); manualHeader('Net_Portscan','packages.networking.net_portscan.php'); ?><H1 ><A NAME="packages.Networking.Net_Portscan" ><B CLASS="classname" >Net_Portscan</B ></A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN504" ></A ><B CLASS="classname" >Net_Portscan</B > -- Portscanner utilities. </DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_Portscan.checkPort" ></A ><H2 >Net_Portscan::checkPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN510" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >boolean <B CLASS="function" >Net_Portscan::checkPort</B ></CODE > (string host, integer port [, integer timeout])</CODE ></P ><P ></P ></DIV ><P > This function checks if there is a service available at the specified port on the specified machine. It there is a service, the function returns true. Otherwise it returns false. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN519" ></A ><P ><B >Example 1. Using checkPort</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > require_once "Net_Portscan/Portscan.php"; if (Net_Portscan::checkPort("localhost", 80) == NET_PORTSCAN_SERVICE_FOUND) { echo "There is a service on localhost on port 80 (" . Net_Portscan::getService(80) . ").\n"; } </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_Portscan.checkPortRange" ></A ><H2 >Net_Portscan::checkPortRange</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN524" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >array <B CLASS="function" >Net_Portscan::checkPortRange</B ></CODE > (string host, integer minPort, integer maxPort [, integer timeout])</CODE ></P ><P ></P ></DIV ><P > This function is pretty identical to checkPort, except it takes a range of ports, that are scanned. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN534" ></A ><P ><B >Example 2. Using checkPortRange</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > require_once "Net_Portscan/Portscan.php"; echo "Scanning localhost ports 70-90\n"; $result = Net_Portscan::checkPortRange("localhost", 70, 90); foreach ($result as $port => $element) { if ($element == NET_PORTSCAN_SERVICE_FOUND) { echo "On port " . $port . " there is running a service.\n"; } else { echo "On port " . $port . " there is no service running.\n"; } } </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_Portscan.getService" ></A ><H2 >Net_Portscan::getService</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN539" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >string <B CLASS="function" >Net_Portscan::checkPortRange</B ></CODE > (integer port, string protocol)</CODE ></P ><P ></P ></DIV ><P > This function returns the service associated with port for the specified protocol as per /etc/services. protocol is either tcp or udp. (Default is tcp.) </P ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_Portscan.getPort" ></A ><H2 >Net_Portscan::getPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN548" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >integer <B CLASS="function" >Net_Portscan::getPort</B ></CODE > (string service, string protocol)</CODE ></P ><P ></P ></DIV ><P > This function returns the port which corresponds to service for the specified protocol as per /etc/services. protocol is either tcp or udp. (Default is tcp.) </P ></DIV ><?php manualFooter('Net_Portscan','packages.networking.net_portscan.php'); ?> Index: pearweb/public_html/manual/packages.networking.php +++ pearweb/public_html/manual/packages.networking.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.auth.auth_http.php', 'Auth_HTTP'), 'next' => array('packages.networking.net_checkip.php', 'Net_CheckIP'), 'up' => array('packages.php', 'PEAR Packages'), 'toc' => array( array('packages.php#packages', ''), array('packages.auth.php', 'Authentication'), array('packages.networking.php', 'Networking')))); manualHeader('Networking','packages.networking.php'); ?><DIV CLASS="reference" ><A NAME="packages.Networking" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >III. Networking</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN484" ></A ><P > Networking utilities. </P ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="packages.networking.net_checkip.php" ><B CLASS="classname" >Net_CheckIP</B ></A > — Validation of IPv4 adresses </DT ><DT ><A HREF="packages.networking.net_portscan.php" ><B CLASS="classname" >Net_Portscan</B ></A > — Portscanner utilities. </DT ></DL ></DIV ></DIV ></DIV ><?php manualFooter('Networking','packages.networking.php'); ?>
Index: pearweb/public_html/manual/contributing-introducing.php diff -u pearweb/public_html/manual/contributing-introducing.php:1.3 pearweb/public_html/manual/contributing-introducing.php:1.4 --- pearweb/public_html/manual/contributing-introducing.php:1.3 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/contributing-introducing.php Fri Nov 16 16:41:54 2001 @@ -7,7 +7,7 @@ 'up' => array('contributing-howto.php', 'How to contribute to PEAR'), 'toc' => array( array('contributing-howto.php#contributing-howto', ''), - array('contributing-howto.php#AEN529', ''), + array('contributing-howto.php#AEN559', ''), array('contributing-howto.php#contributing-introduction', 'Introduction'), array('contributing-requirements.php', 'Requirements'), array('contributing-introducing.php', 'Introducing your code')))); Index: pearweb/public_html/manual/contributing-requirements.php diff -u pearweb/public_html/manual/contributing-requirements.php:1.3 pearweb/public_html/manual/contributing-requirements.php:1.4 --- pearweb/public_html/manual/contributing-requirements.php:1.3 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/contributing-requirements.php Fri Nov 16 16:41:54 2001 @@ -7,7 +7,7 @@ 'up' => array('contributing-howto.php', 'How to contribute to PEAR'), 'toc' => array( array('contributing-howto.php#contributing-howto', ''), - array('contributing-howto.php#AEN529', ''), + array('contributing-howto.php#AEN559', ''), array('contributing-howto.php#contributing-introduction', 'Introduction'), array('contributing-requirements.php', 'Requirements'), array('contributing-introducing.php', 'Introducing your code')))); Index: pearweb/public_html/manual/contributing.php diff -u pearweb/public_html/manual/contributing.php:1.3 pearweb/public_html/manual/contributing.php:1.4 --- pearweb/public_html/manual/contributing.php:1.3 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/contributing.php Fri Nov 16 16:41:54 2001 @@ -2,7 +2,7 @@ sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), - 'prev' => array('packages.net_portscan.net_portscan.php', 'Net_Portscan'), + 'prev' => array('packages.networking.net_portscan.php', 'Net_Portscan'), 'next' => array('contributing-howto.php', 'How to contribute to PEAR'), 'up' => array('index.php', 'PEAR Manual'), 'toc' => array( Index: pearweb/public_html/manual/index.php diff -u pearweb/public_html/manual/index.php:1.5 pearweb/public_html/manual/index.php:1.6 --- pearweb/public_html/manual/index.php:1.5 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/index.php Fri Nov 16 16:41:54 2001 @@ -92,17 +92,12 @@ ><DT >II. <A HREF="packages.auth.php" ->Auth</A -></DT -><DT -><A -HREF="packages.net_checkip.php" ->Net_CheckIP: Validation of IPv4 adresses</A +>Authentication</A ></DT ><DT >III. <A -HREF="packages.net_portscan.php" ->Net_Portscan</A +HREF="packages.networking.php" +>Networking</A ></DT ></DL ></DD Index: pearweb/public_html/manual/packages.auth.auth.php diff -u pearweb/public_html/manual/packages.auth.auth.php:1.1 pearweb/public_html/manual/packages.auth.auth.php:1.2 --- pearweb/public_html/manual/packages.auth.auth.php:1.1 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.auth.auth.php Fri Nov 16 16:41:54 2001 @@ -2,13 +2,14 @@ sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), - 'prev' => array('packages.auth.php', 'Auth'), - 'next' => array('packages.net_checkip.php', ''), - 'up' => array('packages.auth.php', 'Auth'), + 'prev' => array('packages.auth.php', 'Authentication'), + 'next' => array('packages.auth.auth_http.php', 'Auth_HTTP'), + 'up' => array('packages.auth.php', 'Authentication'), 'toc' => array( array('packages.auth.php#packages.Auth', ''), array('packages.auth.php#AEN417', ''), - array('packages.auth.auth.php', 'Auth')))); + array('packages.auth.auth.php', 'Auth'), + array('packages.auth.auth_http.php', 'Auth_HTTP')))); manualHeader('Auth','packages.auth.auth.php'); ?><H1 ><A @@ -92,7 +93,7 @@ ><TD ><PRE CLASS="programlisting" -> require_once "Auth.php"; +> require_once "Auth/Auth.php"; function myOutput($username, $status) { @@ -121,6 +122,73 @@ ></TD ></TR ></TABLE +><TABLE +WIDTH="100%" +BORDER="0" +CELLPADDING="0" +CELLSPACING="0" +CLASS="EXAMPLE" +><TR +><TD +><DIV +CLASS="example" +><A +NAME="AEN439" +></A +><P +><B +>Example 2. Using different DB parameters</B +></P +><TABLE +BORDER="0" +BGCOLOR="#E0E0E0" +WIDTH="100%" +><TR +><TD +><PRE +CLASS="programlisting" +> require_once "Auth/Auth.php"; + +function myOutput($username, $status) +{ + ... /** See example 1 for the full listing */ +} + +$params = array( + "dsn" => "mysql://martin:test@localhost/auth", + "table" => "myAuth", + "usernamecol" => "myUserColumn", + "passwordcol" => "myPasswordColumn" + ); + +$a = new Auth("DB", $params, "myOutput"); + +$a->start(); + +if ($a->getAuth()) { + echo "You have been authenticated successfully."; +} + </PRE +></TD +></TR +></TABLE +></DIV +></TD +></TR +></TABLE +><P +> This example shows you, how you can specifiy alternative + names for the database table and the column names. In our + example, we use the table myAuth, select the username from + the field myUserColumn and the password from the field + myPasswordColumn. The Default values for this fields are + auth, username and password. + </P +><P +> This feature is necessary if you want to use PEAR::Auth + with a database layout that is different from the one, + PEAR::Auth uses by default. + </P ></DIV ><DIV CLASS="refsect1" @@ -132,7 +200,7 @@ ><DIV CLASS="funcsynopsis" ><A -NAME="AEN441" +NAME="AEN446" ></A ><P ></P @@ -163,7 +231,7 @@ ><DIV CLASS="funcsynopsis" ><A -NAME="AEN449" +NAME="AEN454" ></A ><P ></P Index: pearweb/public_html/manual/packages.auth.php diff -u pearweb/public_html/manual/packages.auth.php:1.4 pearweb/public_html/manual/packages.auth.php:1.5 --- pearweb/public_html/manual/packages.auth.php:1.4 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/packages.auth.php Fri Nov 16 16:41:54 2001 @@ -7,11 +7,9 @@ 'up' => array('packages.php', 'PEAR Packages'), 'toc' => array( array('packages.php#packages', ''), - array('packages.auth.php', 'Auth'), - array('packages.php#AEN0', ''), - array('packages.net_checkip.php', ''), - array('packages.net_portscan.php', 'Net_Portscan')))); -manualHeader('Auth','packages.auth.php'); + array('packages.auth.php', 'Authentication'), + array('packages.networking.php', 'Networking')))); +manualHeader('Authentication','packages.auth.php'); ?><DIV CLASS="reference" ><A @@ -21,7 +19,7 @@ CLASS="TITLEPAGE" ><H1 CLASS="title" ->II. Auth</H1 +>II. Authentication</H1 ><DIV CLASS="PARTINTRO" ><A @@ -49,9 +47,19 @@ > — PHP based authentication systems. </DT +><DT +><A +HREF="packages.auth.auth_http.php" +><B +CLASS="classname" +>Auth_HTTP</B +></A +> — + HTTP authentication with PHP. + </DT ></DL ></DIV ></DIV ></DIV -><?php manualFooter('Auth','packages.auth.php'); +><?php manualFooter('Authentication','packages.auth.php'); ?> Index: pearweb/public_html/manual/packages.php diff -u pearweb/public_html/manual/packages.php:1.4 pearweb/public_html/manual/packages.php:1.5 --- pearweb/public_html/manual/packages.php:1.4 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/packages.php Fri Nov 16 16:41:54 2001 @@ -3,7 +3,7 @@ setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('class.pear-error.php', 'PEAR_Error'), - 'next' => array('packages.auth.php', 'Auth'), + 'next' => array('packages.auth.php', 'Authentication'), 'up' => array('index.php', 'PEAR Manual'), 'toc' => array( array('index.php#manual', ''), @@ -35,17 +35,12 @@ ><DT >II. <A HREF="packages.auth.php" ->Auth</A -></DT -><DT -><A -HREF="packages.net_checkip.php" ->Net_CheckIP: Validation of IPv4 adresses</A +>Authentication</A ></DT ><DT >III. <A -HREF="packages.net_portscan.php" ->Net_Portscan</A +HREF="packages.networking.php" +>Networking</A ></DT ></DL ></DIV Index: pearweb/public_html/manual/packages.skeleton.php diff -u pearweb/public_html/manual/packages.skeleton.php:1.5 pearweb/public_html/manual/packages.skeleton.php:1.6 --- pearweb/public_html/manual/packages.skeleton.php:1.5 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/packages.skeleton.php Fri Nov 16 16:41:54 2001 @@ -19,7 +19,7 @@ ><H1 CLASS="title" ><A -NAME="AEN561" +NAME="AEN591" >Skeleton for creating PEAR docbook documentation</A ></H1 ><HR></DIV Index: pearweb/public_html/manual/standards.cvs.php diff -u pearweb/public_html/manual/standards.cvs.php:1.5 pearweb/public_html/manual/standards.cvs.php:1.6 --- pearweb/public_html/manual/standards.cvs.php:1.5 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/standards.cvs.php Fri Nov 16 16:41:54 2001 @@ -32,7 +32,7 @@ > This section applies only to packages using CVS at cvs.php.net. </P ><P -> Include the $Id: standards.cvs.php,v 1.5 2001/11/15 20:57:43 mj Exp $ CVS keyword in each file. As each file +> Include the $Id: standards.cvs.php,v 1.6 2001/11/16 21:41:54 mj Exp $ CVS keyword in each file. As each file is edited, add this tag if it's not yet present (or replace existing forms such as "Last Modified:", etc.). Index: pearweb/public_html/manual/standards.header.php diff -u pearweb/public_html/manual/standards.header.php:1.5 pearweb/public_html/manual/standards.header.php:1.6 --- pearweb/public_html/manual/standards.header.php:1.5 Thu Nov 15 15:57:43 2001 +++ pearweb/public_html/manual/standards.header.php Fri Nov 16 16:41:54 2001 @@ -57,7 +57,7 @@ // | Your Name <you@example.com> | // +----------------------------------------------------------------------+ // -// $Id: standards.header.php,v 1.5 2001/11/15 20:57:43 mj Exp $ +// $Id: standards.header.php,v 1.6 2001/11/16 21:41:54 mj Exp $ </PRE ></TD ></TR Index: pearweb/public_html/manual/packages.auth.auth_http.php +++ pearweb/public_html/manual/packages.auth.auth_http.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.auth.auth.php', 'Auth'), 'next' => array('packages.networking.php', 'Networking'), 'up' => array('packages.auth.php', 'Authentication'), 'toc' => array( array('packages.auth.php#packages.Auth', ''), array('packages.auth.php#AEN417', ''), array('packages.auth.auth.php', 'Auth'), array('packages.auth.auth_http.php', 'Auth_HTTP')))); manualHeader('Auth_HTTP','packages.auth.auth_http.php'); ?><H1 ><A NAME="packages.Auth.Auth_HTTP" ><B CLASS="classname" >Auth_HTTP</B ></A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN464" ></A ><B CLASS="classname" >Auth_HTTP</B > -- HTTP authentication with PHP. </DIV ><DIV CLASS="refsect1" ><A NAME="packages.Auth.Auth_HTTP.Auth_HTTP" ></A ><H2 >Auth_HTTP::Auth_HTTP</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN470" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" ><B CLASS="function" >Auth::Auth</B ></CODE > (string storageDriver, mixed options)</CODE ></P ><P ></P ></DIV ><P > Constructor for the authencation system. The first parameter is the name of the storage driver, that should be used. The second parameter can either be a string containing some login information or an array containing a bunch of options for the storage driver. </P ><P > For more information on usage of the constructor parameters, please refer to the documentation of PEAR::Auth. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN479" ></A ><P ><B >Example 1. Simple usage example</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > require_once "Auth_HTTP/Auth_HTTP.php"; $a = new Auth_HTTP("DB", "mysql://test:test@localhost/test"); $a->start(); </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><?php manualFooter('Auth_HTTP','packages.auth.auth_http.php'); ?> Index: pearweb/public_html/manual/packages.networking.net_checkip.php +++ pearweb/public_html/manual/packages.networking.net_checkip.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.networking.php', 'Networking'), 'next' => array('packages.networking.net_portscan.php', 'Net_Portscan'), 'up' => array('packages.networking.php', 'Networking'), 'toc' => array( array('packages.networking.php#packages.Networking', ''), array('packages.networking.php#AEN484', ''), array('packages.networking.net_checkip.php', 'Net_CheckIP'), array('packages.networking.net_portscan.php', 'Net_Portscan')))); manualHeader('Net_CheckIP','packages.networking.net_checkip.php'); ?><H1 ><A NAME="packages.Networking.Net_CheckIP" ><B CLASS="classname" >Net_CheckIP</B ></A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN487" ></A ><B CLASS="classname" >Net_CheckIP</B > -- Validation of IPv4 adresses </DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_CheckIP.check_ip" ></A ><H2 >Net_Portscan::checkPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN493" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >boolean <B CLASS="function" >Net_CheckIP::check_ip</B ></CODE > (string ip)</CODE ></P ><P ></P ></DIV ><P > This function can validate if a given string has a valid IPv4 syntax. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN500" ></A ><P ><B >Example 1. Using checkPort</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > require_once "Net_CheckIP/CheckIP.php"; if (Net_CheckIP::check_ip("your_ip_goes_here")) { // Syntax of the IP is ok } </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><?php manualFooter('Net_CheckIP','packages.networking.net_checkip.php'); ?> Index: pearweb/public_html/manual/packages.networking.net_portscan.php +++ pearweb/public_html/manual/packages.networking.net_portscan.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.networking.net_checkip.php', 'Net_CheckIP'), 'next' => array('contributing.php', 'Contributing to PEAR'), 'up' => array('packages.networking.php', 'Networking'), 'toc' => array( array('packages.networking.php#packages.Networking', ''), array('packages.networking.php#AEN484', ''), array('packages.networking.net_checkip.php', 'Net_CheckIP'), array('packages.networking.net_portscan.php', 'Net_Portscan')))); manualHeader('Net_Portscan','packages.networking.net_portscan.php'); ?><H1 ><A NAME="packages.Networking.Net_Portscan" ><B CLASS="classname" >Net_Portscan</B ></A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN504" ></A ><B CLASS="classname" >Net_Portscan</B > -- Portscanner utilities. </DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_Portscan.checkPort" ></A ><H2 >Net_Portscan::checkPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN510" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >boolean <B CLASS="function" >Net_Portscan::checkPort</B ></CODE > (string host, integer port [, integer timeout])</CODE ></P ><P ></P ></DIV ><P > This function checks if there is a service available at the specified port on the specified machine. It there is a service, the function returns true. Otherwise it returns false. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN519" ></A ><P ><B >Example 1. Using checkPort</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > require_once "Net_Portscan/Portscan.php"; if (Net_Portscan::checkPort("localhost", 80) == NET_PORTSCAN_SERVICE_FOUND) { echo "There is a service on localhost on port 80 (" . Net_Portscan::getService(80) . ").\n"; } </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_Portscan.checkPortRange" ></A ><H2 >Net_Portscan::checkPortRange</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN524" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >array <B CLASS="function" >Net_Portscan::checkPortRange</B ></CODE > (string host, integer minPort, integer maxPort [, integer timeout])</CODE ></P ><P ></P ></DIV ><P > This function is pretty identical to checkPort, except it takes a range of ports, that are scanned. </P ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN534" ></A ><P ><B >Example 2. Using checkPortRange</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="programlisting" > require_once "Net_Portscan/Portscan.php"; echo "Scanning localhost ports 70-90\n"; $result = Net_Portscan::checkPortRange("localhost", 70, 90); foreach ($result as $port => $element) { if ($element == NET_PORTSCAN_SERVICE_FOUND) { echo "On port " . $port . " there is running a service.\n"; } else { echo "On port " . $port . " there is no service running.\n"; } } </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_Portscan.getService" ></A ><H2 >Net_Portscan::getService</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN539" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >string <B CLASS="function" >Net_Portscan::checkPortRange</B ></CODE > (integer port, string protocol)</CODE ></P ><P ></P ></DIV ><P > This function returns the service associated with port for the specified protocol as per /etc/services. protocol is either tcp or udp. (Default is tcp.) </P ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Networking.Net_Portscan.getPort" ></A ><H2 >Net_Portscan::getPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN548" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >integer <B CLASS="function" >Net_Portscan::getPort</B ></CODE > (string service, string protocol)</CODE ></P ><P ></P ></DIV ><P > This function returns the port which corresponds to service for the specified protocol as per /etc/services. protocol is either tcp or udp. (Default is tcp.) </P ></DIV ><?php manualFooter('Net_Portscan','packages.networking.net_portscan.php'); ?> Index: pearweb/public_html/manual/packages.networking.php +++ pearweb/public_html/manual/packages.networking.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.auth.auth_http.php', 'Auth_HTTP'), 'next' => array('packages.networking.net_checkip.php', 'Net_CheckIP'), 'up' => array('packages.php', 'PEAR Packages'), 'toc' => array( array('packages.php#packages', ''), array('packages.auth.php', 'Authentication'), array('packages.networking.php', 'Networking')))); manualHeader('Networking','packages.networking.php'); ?><DIV CLASS="reference" ><A NAME="packages.Networking" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >III. Networking</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN484" ></A ><P > Networking utilities. </P ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="packages.networking.net_checkip.php" ><B CLASS="classname" >Net_CheckIP</B ></A > — Validation of IPv4 adresses </DT ><DT ><A HREF="packages.networking.net_portscan.php" ><B CLASS="classname" >Net_Portscan</B ></A > — Portscanner utilities. </DT ></DL ></DIV ></DIV ></DIV ><?php manualFooter('Networking','packages.networking.php'); ?>