cvs: pearweb /public_html/manual contributing-introducing.php contributing-requirements.php contributing.php index.php packages.auth.php
packages.net_checkip.php packages.net_portscan.net_portscan.php packages.net_portscan.php packages.php packages.skeleton.php standards.cvs.php
standards.header.php
| From: | Martin Jansen | Date: | Thu, 15 Nov 2001 20:57:43 +0000 |
| Subject: | cvs: pearweb /public_html/manual contributing-introducing.php contributing-requirements.php contributing.php index.php packages.auth.php packages.net_checkip.php packages.net_portscan.net_portscan.php packages.net_portscan.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-1328@lists.php.net to get a copy of this message | ||
mj Thu Nov 15 15:57:43 2001 EDT
Added files:
/pearweb/public_html/manual packages.net_portscan.net_portscan.php
packages.net_portscan.php
Modified files:
/pearweb/public_html/manual contributing-introducing.php
contributing-requirements.php
contributing.php index.php
packages.auth.php
packages.net_checkip.php packages.php
packages.skeleton.php standards.cvs.php
standards.header.php
Log:
* Manual update.
Index: pearweb/public_html/manual/contributing-introducing.php diff -u pearweb/public_html/manual/contributing-introducing.php:1.2 pearweb/public_html/manual/contributing-introducing.php:1.3 --- pearweb/public_html/manual/contributing-introducing.php:1.2 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/contributing-introducing.php Thu Nov 15 15:57:43 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#AEN473', ''), + array('contributing-howto.php#AEN529', ''), 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.2 pearweb/public_html/manual/contributing-requirements.php:1.3 --- pearweb/public_html/manual/contributing-requirements.php:1.2 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/contributing-requirements.php Thu Nov 15 15:57:43 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#AEN473', ''), + array('contributing-howto.php#AEN529', ''), 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.2 pearweb/public_html/manual/contributing.php:1.3 --- pearweb/public_html/manual/contributing.php:1.2 Sun Oct 28 05:51:55 2001 +++ pearweb/public_html/manual/contributing.php Thu Nov 15 15:57:43 2001 @@ -2,7 +2,7 @@ sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), - 'prev' => array('packages.net_checkip.php', ''), + 'prev' => array('packages.net_portscan.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.4 pearweb/public_html/manual/index.php:1.5 --- pearweb/public_html/manual/index.php:1.4 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/index.php Thu Nov 15 15:57:43 2001 @@ -99,6 +99,11 @@ HREF="packages.net_checkip.php" >Net_CheckIP: Validation of IPv4 adresses</A ></DT +><DT +>III. <A +HREF="packages.net_portscan.php" +>Net_Portscan</A +></DT ></DL ></DD ><DT Index: pearweb/public_html/manual/packages.auth.php diff -u pearweb/public_html/manual/packages.auth.php:1.3 pearweb/public_html/manual/packages.auth.php:1.4 --- pearweb/public_html/manual/packages.auth.php:1.3 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.auth.php Thu Nov 15 15:57:43 2001 @@ -9,7 +9,8 @@ array('packages.php#packages', ''), array('packages.auth.php', 'Auth'), array('packages.php#AEN0', ''), - array('packages.net_checkip.php', '')))); + array('packages.net_checkip.php', ''), + array('packages.net_portscan.php', 'Net_Portscan')))); manualHeader('Auth','packages.auth.php'); ?><DIV CLASS="reference" Index: pearweb/public_html/manual/packages.net_checkip.php diff -u pearweb/public_html/manual/packages.net_checkip.php:1.3 pearweb/public_html/manual/packages.net_checkip.php:1.4 --- pearweb/public_html/manual/packages.net_checkip.php:1.3 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.net_checkip.php Thu Nov 15 15:57:43 2001 @@ -3,13 +3,14 @@ setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.auth.auth.php', 'Auth'), - 'next' => array('contributing.php', 'Contributing to PEAR'), + 'next' => array('packages.net_portscan.php', 'Net_Portscan'), '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_checkip.php', ''), + array('packages.net_portscan.php', 'Net_Portscan')))); manualHeader('','packages.net_checkip.php'); ?><DIV CLASS="ARTICLE" Index: pearweb/public_html/manual/packages.php diff -u pearweb/public_html/manual/packages.php:1.3 pearweb/public_html/manual/packages.php:1.4 --- pearweb/public_html/manual/packages.php:1.3 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.php Thu Nov 15 15:57:43 2001 @@ -42,6 +42,11 @@ HREF="packages.net_checkip.php" >Net_CheckIP: Validation of IPv4 adresses</A ></DT +><DT +>III. <A +HREF="packages.net_portscan.php" +>Net_Portscan</A +></DT ></DL ></DIV ></DIV Index: pearweb/public_html/manual/packages.skeleton.php diff -u pearweb/public_html/manual/packages.skeleton.php:1.4 pearweb/public_html/manual/packages.skeleton.php:1.5 --- pearweb/public_html/manual/packages.skeleton.php:1.4 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.skeleton.php Thu Nov 15 15:57:43 2001 @@ -19,7 +19,7 @@ ><H1 CLASS="title" ><A -NAME="AEN505" +NAME="AEN561" >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.4 pearweb/public_html/manual/standards.cvs.php:1.5 --- pearweb/public_html/manual/standards.cvs.php:1.4 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/standards.cvs.php Thu Nov 15 15:57:43 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.4 2001/11/04 10:10:48 mj Exp $ CVS keyword in each file. As each file +> 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 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.4 pearweb/public_html/manual/standards.header.php:1.5 --- pearweb/public_html/manual/standards.header.php:1.4 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/standards.header.php Thu Nov 15 15:57:43 2001 @@ -57,7 +57,7 @@ // | Your Name <you@example.com> | // +----------------------------------------------------------------------+ // -// $Id: standards.header.php,v 1.4 2001/11/04 10:10:48 mj Exp $ +// $Id: standards.header.php,v 1.5 2001/11/15 20:57:43 mj Exp $ </PRE ></TD ></TR Index: pearweb/public_html/manual/packages.net_portscan.net_portscan.php +++ pearweb/public_html/manual/packages.net_portscan.net_portscan.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.net_portscan.php', 'Net_Portscan'), 'next' => array('contributing.php', 'Contributing to PEAR'), 'up' => array('packages.net_portscan.php', 'Net_Portscan'), 'toc' => array( array('packages.net_portscan.php#packages.Net_Portscan', ''), array('packages.net_portscan.php#AEN471', ''), array('packages.net_portscan.net_portscan.php', 'Net_Portscan')))); manualHeader('Net_Portscan','packages.net_portscan.net_portscan.php'); ?><H1 ><A NAME="packages.Net_Portscan.Net_Portscan" ><B CLASS="classname" >Net_Portscan</B ></A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN474" ></A ><B CLASS="classname" >Net_Portscan</B > -- Portscanner utilities. </DIV ><DIV CLASS="refsect1" ><A NAME="packages.Net_Portscan.Net_Portscan.checkPort" ></A ><H2 >Net_Portscan::checkPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN480" ></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="AEN489" ></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 your machine on port 80 (" . Net_Portscan::getService(80) . ").\n"; } </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Net_Portscan.Net_Portscan.checkPortRange" ></A ><H2 >Net_Portscan::checkPortRange</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN494" ></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="AEN504" ></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.Net_Portscan.Net_Portscan.getService" ></A ><H2 >Net_Portscan::getService</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN509" ></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.Net_Portscan.Net_Portscan.getPort" ></A ><H2 >Net_Portscan::getPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN518" ></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.net_portscan.net_portscan.php'); ?> Index: pearweb/public_html/manual/packages.net_portscan.php +++ pearweb/public_html/manual/packages.net_portscan.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.net_checkip.php', ''), 'next' => array('packages.net_portscan.net_portscan.php', 'Net_Portscan'), '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('Net_Portscan','packages.net_portscan.php'); ?><DIV CLASS="reference" ><A NAME="packages.Net_Portscan" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >III. Net_Portscan</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN471" ></A ><P > The Net_Portscan package provides </P ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="packages.net_portscan.net_portscan.php" ><B CLASS="classname" >Net_Portscan</B ></A > — Portscanner utilities. </DT ></DL ></DIV ></DIV ></DIV ><?php manualFooter('Net_Portscan','packages.net_portscan.php'); ?>
Index: pearweb/public_html/manual/contributing-introducing.php diff -u pearweb/public_html/manual/contributing-introducing.php:1.2 pearweb/public_html/manual/contributing-introducing.php:1.3 --- pearweb/public_html/manual/contributing-introducing.php:1.2 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/contributing-introducing.php Thu Nov 15 15:57:43 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#AEN473', ''), + array('contributing-howto.php#AEN529', ''), 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.2 pearweb/public_html/manual/contributing-requirements.php:1.3 --- pearweb/public_html/manual/contributing-requirements.php:1.2 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/contributing-requirements.php Thu Nov 15 15:57:43 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#AEN473', ''), + array('contributing-howto.php#AEN529', ''), 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.2 pearweb/public_html/manual/contributing.php:1.3 --- pearweb/public_html/manual/contributing.php:1.2 Sun Oct 28 05:51:55 2001 +++ pearweb/public_html/manual/contributing.php Thu Nov 15 15:57:43 2001 @@ -2,7 +2,7 @@ sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), - 'prev' => array('packages.net_checkip.php', ''), + 'prev' => array('packages.net_portscan.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.4 pearweb/public_html/manual/index.php:1.5 --- pearweb/public_html/manual/index.php:1.4 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/index.php Thu Nov 15 15:57:43 2001 @@ -99,6 +99,11 @@ HREF="packages.net_checkip.php" >Net_CheckIP: Validation of IPv4 adresses</A ></DT +><DT +>III. <A +HREF="packages.net_portscan.php" +>Net_Portscan</A +></DT ></DL ></DD ><DT Index: pearweb/public_html/manual/packages.auth.php diff -u pearweb/public_html/manual/packages.auth.php:1.3 pearweb/public_html/manual/packages.auth.php:1.4 --- pearweb/public_html/manual/packages.auth.php:1.3 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.auth.php Thu Nov 15 15:57:43 2001 @@ -9,7 +9,8 @@ array('packages.php#packages', ''), array('packages.auth.php', 'Auth'), array('packages.php#AEN0', ''), - array('packages.net_checkip.php', '')))); + array('packages.net_checkip.php', ''), + array('packages.net_portscan.php', 'Net_Portscan')))); manualHeader('Auth','packages.auth.php'); ?><DIV CLASS="reference" Index: pearweb/public_html/manual/packages.net_checkip.php diff -u pearweb/public_html/manual/packages.net_checkip.php:1.3 pearweb/public_html/manual/packages.net_checkip.php:1.4 --- pearweb/public_html/manual/packages.net_checkip.php:1.3 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.net_checkip.php Thu Nov 15 15:57:43 2001 @@ -3,13 +3,14 @@ setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.auth.auth.php', 'Auth'), - 'next' => array('contributing.php', 'Contributing to PEAR'), + 'next' => array('packages.net_portscan.php', 'Net_Portscan'), '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_checkip.php', ''), + array('packages.net_portscan.php', 'Net_Portscan')))); manualHeader('','packages.net_checkip.php'); ?><DIV CLASS="ARTICLE" Index: pearweb/public_html/manual/packages.php diff -u pearweb/public_html/manual/packages.php:1.3 pearweb/public_html/manual/packages.php:1.4 --- pearweb/public_html/manual/packages.php:1.3 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.php Thu Nov 15 15:57:43 2001 @@ -42,6 +42,11 @@ HREF="packages.net_checkip.php" >Net_CheckIP: Validation of IPv4 adresses</A ></DT +><DT +>III. <A +HREF="packages.net_portscan.php" +>Net_Portscan</A +></DT ></DL ></DIV ></DIV Index: pearweb/public_html/manual/packages.skeleton.php diff -u pearweb/public_html/manual/packages.skeleton.php:1.4 pearweb/public_html/manual/packages.skeleton.php:1.5 --- pearweb/public_html/manual/packages.skeleton.php:1.4 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/packages.skeleton.php Thu Nov 15 15:57:43 2001 @@ -19,7 +19,7 @@ ><H1 CLASS="title" ><A -NAME="AEN505" +NAME="AEN561" >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.4 pearweb/public_html/manual/standards.cvs.php:1.5 --- pearweb/public_html/manual/standards.cvs.php:1.4 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/standards.cvs.php Thu Nov 15 15:57:43 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.4 2001/11/04 10:10:48 mj Exp $ CVS keyword in each file. As each file +> 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 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.4 pearweb/public_html/manual/standards.header.php:1.5 --- pearweb/public_html/manual/standards.header.php:1.4 Sun Nov 4 05:10:48 2001 +++ pearweb/public_html/manual/standards.header.php Thu Nov 15 15:57:43 2001 @@ -57,7 +57,7 @@ // | Your Name <you@example.com> | // +----------------------------------------------------------------------+ // -// $Id: standards.header.php,v 1.4 2001/11/04 10:10:48 mj Exp $ +// $Id: standards.header.php,v 1.5 2001/11/15 20:57:43 mj Exp $ </PRE ></TD ></TR Index: pearweb/public_html/manual/packages.net_portscan.net_portscan.php +++ pearweb/public_html/manual/packages.net_portscan.net_portscan.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.net_portscan.php', 'Net_Portscan'), 'next' => array('contributing.php', 'Contributing to PEAR'), 'up' => array('packages.net_portscan.php', 'Net_Portscan'), 'toc' => array( array('packages.net_portscan.php#packages.Net_Portscan', ''), array('packages.net_portscan.php#AEN471', ''), array('packages.net_portscan.net_portscan.php', 'Net_Portscan')))); manualHeader('Net_Portscan','packages.net_portscan.net_portscan.php'); ?><H1 ><A NAME="packages.Net_Portscan.Net_Portscan" ><B CLASS="classname" >Net_Portscan</B ></A ></H1 ><DIV CLASS="refnamediv" ><A NAME="AEN474" ></A ><B CLASS="classname" >Net_Portscan</B > -- Portscanner utilities. </DIV ><DIV CLASS="refsect1" ><A NAME="packages.Net_Portscan.Net_Portscan.checkPort" ></A ><H2 >Net_Portscan::checkPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN480" ></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="AEN489" ></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 your machine on port 80 (" . Net_Portscan::getService(80) . ").\n"; } </PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></DIV ><DIV CLASS="refsect1" ><A NAME="packages.Net_Portscan.Net_Portscan.checkPortRange" ></A ><H2 >Net_Portscan::checkPortRange</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN494" ></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="AEN504" ></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.Net_Portscan.Net_Portscan.getService" ></A ><H2 >Net_Portscan::getService</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN509" ></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.Net_Portscan.Net_Portscan.getPort" ></A ><H2 >Net_Portscan::getPort</H2 ><DIV CLASS="funcsynopsis" ><A NAME="AEN518" ></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.net_portscan.net_portscan.php'); ?> Index: pearweb/public_html/manual/packages.net_portscan.php +++ pearweb/public_html/manual/packages.net_portscan.php <?php sendManualHeaders('ISO-8859-1','en'); setupNavigation(array( 'home' => array('index.php', 'PEAR Manual'), 'prev' => array('packages.net_checkip.php', ''), 'next' => array('packages.net_portscan.net_portscan.php', 'Net_Portscan'), '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('Net_Portscan','packages.net_portscan.php'); ?><DIV CLASS="reference" ><A NAME="packages.Net_Portscan" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >III. Net_Portscan</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN471" ></A ><P > The Net_Portscan package provides </P ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="packages.net_portscan.net_portscan.php" ><B CLASS="classname" >Net_Portscan</B ></A > — Portscanner utilities. </DT ></DL ></DIV ></DIV ></DIV ><?php manualFooter('Net_Portscan','packages.net_portscan.php'); ?>