cvs: peardoc /en/packages/networking Net_CheckIP.xml Net_Finger.xml Net_Ping.xml Net_Portscan.xml
| From: | Alexander Merz | Date: | Sat, 05 Jan 2002 13:37:25 +0000 |
| Subject: | cvs: peardoc /en/packages/networking Net_CheckIP.xml Net_Finger.xml Net_Ping.xml Net_Portscan.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1827@lists.php.net to get a copy of this message | ||
alexmerz Sat Jan 5 08:37:25 2002 EDT
Added files:
/peardoc/en/packages/networking Net_CheckIP.xml Net_Finger.xml
Net_Ping.xml Net_Portscan.xml
Log:
split networking.xml into single files and add net_finger doc
Index: peardoc/en/packages/networking/Net_CheckIP.xml +++ peardoc/en/packages/networking/Net_CheckIP.xml <!-- $Id: Net_CheckIP.xml,v 1.1 2002/01/05 13:37:25 alexmerz Exp $ --> <refentry id="packages.Networking.Net_CheckIP"> <refnamediv> <refname><classname>Net_CheckIP</classname></refname> <refpurpose> Validation of IPv4 adresses </refpurpose> </refnamediv> <refsect1 id="packages.Networking.Net_CheckIP.check_ip"> <title>Net_Portscan::checkPort</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>Net_CheckIP::check_ip</function></funcdef> <paramdef>string <parameter>ip</parameter></paramdef> </funcprototype> </funcsynopsis> <para> This function can validate if a given string has a valid IPv4 syntax. </para> <example> <title>Using checkPort</title> <programlisting role="php"> require_once "Net_CheckIP/CheckIP.php"; if (Net_CheckIP::check_ip("your_ip_goes_here")) { // Syntax of the IP is ok } </programlisting> </example> </refsect1> </refentry> Index: peardoc/en/packages/networking/Net_Finger.xml +++ peardoc/en/packages/networking/Net_Finger.xml <!-- $Id: Net_Finger.xml,v 1.1 2002/01/05 13:37:25 alexmerz Exp $ --> <refentry id="packages.Networking.Net_Finger"> <refnamediv> <refname><classname>Net_Finger</classname></refname> <refpurpose> Wrapper class for finger calls </refpurpose> </refnamediv> <refsect1 id="packages.Networking.Net_finger.check"> <title>Net_Ping::check</title> <funcsynopsis> <funcprototype> <funcdef>mixed <function>Net_Finger::check</function></funcdef> <paramdef>string <parameter>$server</parameter></paramdef> <paramdef>string <parameter>$query</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Does a finger query. </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$server</parameter> - the finger-server to query as domain name or as IP-address </para> </listitem> <listitem> <para> <parameter>$query</parameter> - the finger database object to lookup </para> </listitem> </itemizedlist> </para> <para> return <itemizedlist> <listitem> <para> <parameter>string</parameter> - The data returned from the finger-server as string or a PEAR_Error </para> </listitem> </itemizedlist> </para> <example> <title>Using finger</title> <programlisting role="php"> <![CDATA[ $server = "localhost" ; $query = "alexmerz" ; // get information about // this user $data = Net_Finger::query( $server, $query) ; echo $data ; ]]> </programlisting> </example> <warning> <itemizedlist> <listitem> <para> The format of the output from the finger server isn't very standardizes and depends on the system, because the output is optimize for legibility, not for automatic processing. </para> </listitem> <listitem> <para> The finger service isn't avaible by the most public webservers, due to security reasons. The finger function directs rather at intranets or local administration off. </para> </listitem> </itemizedlist> </warning> </refsect1> </refentry> Index: peardoc/en/packages/networking/Net_Ping.xml +++ peardoc/en/packages/networking/Net_Ping.xml <!-- $Id: Net_Ping.xml,v 1.1 2002/01/05 13:37:25 alexmerz Exp $ --> <refentry id="packages.Networking.Net_Ping"> <refnamediv> <refname><classname>Net_Ping</classname></refname> <refpurpose> Wrapper class for ping calls </refpurpose> </refnamediv> <refsect1 id="packages.Networking.Net_Ping.ping"> <title>Net_Ping::ping</title> <funcsynopsis> <funcprototype> <funcdef>array <function>Net_Ping::ping</function></funcdef> <paramdef>string <parameter>host</parameter></paramdef> <paramdef>integer <parameter>counts</parameter></paramdef> <paramdef>integer <parameter>packet_size</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Execute ping and return result. </para> <example> <title>Using ping</title> <programlisting role="php"> require_once "Net_Ping/Ping.php"; $ping = new Net_Ping; print_r($ping->ping("127.0.0.1"); </programlisting> </example> <para> By passing a value for the second parameter <parameter>counts </parameter> you can specify the number of signals that are sent to <parameter>host</parameter> (default is 5). The third parameter <parameter> packet_size</parameter> can be used to change the size of the packets that are sent. </para> </refsect1> </refentry> Index: peardoc/en/packages/networking/Net_Portscan.xml +++ peardoc/en/packages/networking/Net_Portscan.xml <!-- $Id: Net_Portscan.xml,v 1.1 2002/01/05 13:37:25 alexmerz Exp $ --> <refentry id="packages.Networking.Net_Portscan"> <refnamediv> <refname><classname>Net_Portscan</classname></refname> <refpurpose> Portscanner utilities. </refpurpose> </refnamediv> <refsect1 id="packages.Networking.Net_Portscan.checkPort"> <title>Net_Portscan::checkPort</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>Net_Portscan::checkPort</function></funcdef> <paramdef>string <parameter>host</parameter></paramdef> <paramdef>integer <parameter>port</parameter></paramdef> <paramdef>integer <parameter><optional>timeout</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> 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. </para> <example> <title>Using checkPort</title> <programlisting role="php"> 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"; } </programlisting> </example> </refsect1> <refsect1 id="packages.Networking.Net_Portscan.checkPortRange"> <title>Net_Portscan::checkPortRange</title> <funcsynopsis> <funcprototype> <funcdef>array <function>Net_Portscan::checkPortRange</function></funcdef> <paramdef>string <parameter>host</parameter></paramdef> <paramdef>integer <parameter>minPort</parameter></paramdef> <paramdef>integer <parameter>maxPort</parameter></paramdef> <paramdef>integer <parameter><optional>timeout</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> This function is pretty identical to checkPort, except it takes a range of ports, that are scanned. </para> <example> <title>Using checkPortRange</title> <programlisting role="php"> 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"; } } </programlisting> </example> </refsect1> <refsect1 id="packages.Networking.Net_Portscan.getService"> <title>Net_Portscan::getService</title> <funcsynopsis> <funcprototype> <funcdef>string <function>Net_Portscan::checkPortRange</function></funcdef> <paramdef>integer <parameter>port</parameter></paramdef> <paramdef>string <parameter><optional>protocol</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> 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.) </para> </refsect1> <refsect1 id="packages.Networking.Net_Portscan.getPort"> <title>Net_Portscan::getPort</title> <funcsynopsis> <funcprototype> <funcdef>integer <function>Net_Portscan::getPort</function></funcdef> <paramdef>string <parameter>service</parameter></paramdef> <paramdef>string <parameter><optional>protocol</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> 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.) </para> </refsect1> </refentry>
Index: peardoc/en/packages/networking/Net_CheckIP.xml +++ peardoc/en/packages/networking/Net_CheckIP.xml <!-- $Id: Net_CheckIP.xml,v 1.1 2002/01/05 13:37:25 alexmerz Exp $ --> <refentry id="packages.Networking.Net_CheckIP"> <refnamediv> <refname><classname>Net_CheckIP</classname></refname> <refpurpose> Validation of IPv4 adresses </refpurpose> </refnamediv> <refsect1 id="packages.Networking.Net_CheckIP.check_ip"> <title>Net_Portscan::checkPort</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>Net_CheckIP::check_ip</function></funcdef> <paramdef>string <parameter>ip</parameter></paramdef> </funcprototype> </funcsynopsis> <para> This function can validate if a given string has a valid IPv4 syntax. </para> <example> <title>Using checkPort</title> <programlisting role="php"> require_once "Net_CheckIP/CheckIP.php"; if (Net_CheckIP::check_ip("your_ip_goes_here")) { // Syntax of the IP is ok } </programlisting> </example> </refsect1> </refentry> Index: peardoc/en/packages/networking/Net_Finger.xml +++ peardoc/en/packages/networking/Net_Finger.xml <!-- $Id: Net_Finger.xml,v 1.1 2002/01/05 13:37:25 alexmerz Exp $ --> <refentry id="packages.Networking.Net_Finger"> <refnamediv> <refname><classname>Net_Finger</classname></refname> <refpurpose> Wrapper class for finger calls </refpurpose> </refnamediv> <refsect1 id="packages.Networking.Net_finger.check"> <title>Net_Ping::check</title> <funcsynopsis> <funcprototype> <funcdef>mixed <function>Net_Finger::check</function></funcdef> <paramdef>string <parameter>$server</parameter></paramdef> <paramdef>string <parameter>$query</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Does a finger query. </para> <para> Parameter <itemizedlist> <listitem> <para> <parameter>$server</parameter> - the finger-server to query as domain name or as IP-address </para> </listitem> <listitem> <para> <parameter>$query</parameter> - the finger database object to lookup </para> </listitem> </itemizedlist> </para> <para> return <itemizedlist> <listitem> <para> <parameter>string</parameter> - The data returned from the finger-server as string or a PEAR_Error </para> </listitem> </itemizedlist> </para> <example> <title>Using finger</title> <programlisting role="php"> <![CDATA[ $server = "localhost" ; $query = "alexmerz" ; // get information about // this user $data = Net_Finger::query( $server, $query) ; echo $data ; ]]> </programlisting> </example> <warning> <itemizedlist> <listitem> <para> The format of the output from the finger server isn't very standardizes and depends on the system, because the output is optimize for legibility, not for automatic processing. </para> </listitem> <listitem> <para> The finger service isn't avaible by the most public webservers, due to security reasons. The finger function directs rather at intranets or local administration off. </para> </listitem> </itemizedlist> </warning> </refsect1> </refentry> Index: peardoc/en/packages/networking/Net_Ping.xml +++ peardoc/en/packages/networking/Net_Ping.xml <!-- $Id: Net_Ping.xml,v 1.1 2002/01/05 13:37:25 alexmerz Exp $ --> <refentry id="packages.Networking.Net_Ping"> <refnamediv> <refname><classname>Net_Ping</classname></refname> <refpurpose> Wrapper class for ping calls </refpurpose> </refnamediv> <refsect1 id="packages.Networking.Net_Ping.ping"> <title>Net_Ping::ping</title> <funcsynopsis> <funcprototype> <funcdef>array <function>Net_Ping::ping</function></funcdef> <paramdef>string <parameter>host</parameter></paramdef> <paramdef>integer <parameter>counts</parameter></paramdef> <paramdef>integer <parameter>packet_size</parameter></paramdef> </funcprototype> </funcsynopsis> <para> Execute ping and return result. </para> <example> <title>Using ping</title> <programlisting role="php"> require_once "Net_Ping/Ping.php"; $ping = new Net_Ping; print_r($ping->ping("127.0.0.1"); </programlisting> </example> <para> By passing a value for the second parameter <parameter>counts </parameter> you can specify the number of signals that are sent to <parameter>host</parameter> (default is 5). The third parameter <parameter> packet_size</parameter> can be used to change the size of the packets that are sent. </para> </refsect1> </refentry> Index: peardoc/en/packages/networking/Net_Portscan.xml +++ peardoc/en/packages/networking/Net_Portscan.xml <!-- $Id: Net_Portscan.xml,v 1.1 2002/01/05 13:37:25 alexmerz Exp $ --> <refentry id="packages.Networking.Net_Portscan"> <refnamediv> <refname><classname>Net_Portscan</classname></refname> <refpurpose> Portscanner utilities. </refpurpose> </refnamediv> <refsect1 id="packages.Networking.Net_Portscan.checkPort"> <title>Net_Portscan::checkPort</title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>Net_Portscan::checkPort</function></funcdef> <paramdef>string <parameter>host</parameter></paramdef> <paramdef>integer <parameter>port</parameter></paramdef> <paramdef>integer <parameter><optional>timeout</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> 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. </para> <example> <title>Using checkPort</title> <programlisting role="php"> 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"; } </programlisting> </example> </refsect1> <refsect1 id="packages.Networking.Net_Portscan.checkPortRange"> <title>Net_Portscan::checkPortRange</title> <funcsynopsis> <funcprototype> <funcdef>array <function>Net_Portscan::checkPortRange</function></funcdef> <paramdef>string <parameter>host</parameter></paramdef> <paramdef>integer <parameter>minPort</parameter></paramdef> <paramdef>integer <parameter>maxPort</parameter></paramdef> <paramdef>integer <parameter><optional>timeout</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> This function is pretty identical to checkPort, except it takes a range of ports, that are scanned. </para> <example> <title>Using checkPortRange</title> <programlisting role="php"> 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"; } } </programlisting> </example> </refsect1> <refsect1 id="packages.Networking.Net_Portscan.getService"> <title>Net_Portscan::getService</title> <funcsynopsis> <funcprototype> <funcdef>string <function>Net_Portscan::checkPortRange</function></funcdef> <paramdef>integer <parameter>port</parameter></paramdef> <paramdef>string <parameter><optional>protocol</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> 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.) </para> </refsect1> <refsect1 id="packages.Networking.Net_Portscan.getPort"> <title>Net_Portscan::getPort</title> <funcsynopsis> <funcprototype> <funcdef>integer <function>Net_Portscan::getPort</function></funcdef> <paramdef>string <parameter>service</parameter></paramdef> <paramdef>string <parameter><optional>protocol</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <para> 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.) </para> </refsect1> </refentry>