It should be now readable.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@22073 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Egon Schmid 2000-03-28 23:33:28 +00:00
parent 5ea48ac3da
commit 9a4f6de16e

View file

@ -1,50 +1,52 @@
<reference id="ref.network">
<title>Network functions</title>
<title>Network Functions</title>
<titleabbrev>Network</titleabbrev>
<refentry id="function.checkdnsrr">
<refnamediv>
<refname>checkdnsrr</refname>
<refpurpose>Check DNS records corresponding to a given
Internet host name or IP address.</refpurpose>
<refpurpose>
Check DNS records corresponding to a given Internet host name or
IP address
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcdef>int <function>checkdnsrr</function></funcdef>
<paramdef>string <parameter>host</parameter></paramdef>
<paramdef>string <parameter><optional>type</optional></parameter></paramdef>
<paramdef>string
<parameter><optional>type</optional></parameter>
</paramdef>
</funcsynopsis>
<simpara>
Searches DNS for records of type <parameter>type</parameter>
corresponding to <parameter>host</parameter>. Returns true if any
records are found; returns false if no records were found or if
an error occurred.</simpara>
an error occurred.
</simpara>
<simpara>
<parameter>type</parameter> may be any one of: A, MX, NS, SOA,
PTR, CNAME, or ANY. The default is MX.</simpara>
PTR, CNAME, or ANY. The default is MX.
</simpara>
<simpara>
<parameter>host</parameter> may either be the IP address in
dotted-quad notation or the host name.</simpara>
<parameter>Host</parameter> may either be the IP address in
dotted-quad notation or the host name.
</simpara>
<simpara>
See also
<function>getmxrr</function>,
<function>gethostbyaddr</function>,
<function>gethostbyname</function>,
<function>gethostbynamel</function>, and
the named(8) manual page.</simpara>
See also <function>getmxrr</function>,
<function>gethostbyaddr</function>,
<function>gethostbyname</function>,
<function>gethostbynamel</function>, and the named(8) manual
page.
</simpara>
</refsect1>
</refentry>
<refentry id="function.closelog">
<refnamediv>
<refname>closelog</refname>
<refpurpose>close connection to system logger</refpurpose>
<refpurpose>Close connection to system logger</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -53,16 +55,17 @@
<void/>
</funcsynopsis>
<para>
<function>closelog</function> closes the descriptor being used to
<function>Closelog</function> closes the descriptor being used to
write to the system logger. The use of
<function>closelog</function> is optional.</para>
<function>closelog</function> is optional.
</para>
</refsect1>
</refentry>
<refentry id="function.debugger-off">
<refnamediv>
<refname>debugger_off</refname>
<refpurpose>disable internal PHP debugger</refpurpose>
<refpurpose>Disable internal PHP debugger</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -72,14 +75,15 @@
</funcsynopsis>
<para>
Disables the internal PHP debugger. The debugger is still under
development.</para>
development.
</para>
</refsect1>
</refentry>
<refentry id="function.debugger-on">
<refnamediv>
<refname>debugger_on</refname>
<refpurpose>enable internal PHP debugger</refpurpose>
<refpurpose>Enable internal PHP debugger</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -90,14 +94,17 @@
<para>
Enables the internal PHP debugger, connecting it to
<parameter>address</parameter>. The debugger is still under
development.</para>
development.
</para>
</refsect1>
</refentry>
<refentry id="function.fsockopen">
<refnamediv>
<refname>fsockopen</refname>
<refpurpose>Open Internet or Unix domain socket connection.</refpurpose>
<refpurpose>
Open Internet or Unix domain socket connection
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -105,71 +112,80 @@
<funcdef>int <function>fsockopen</function></funcdef>
<paramdef>string <parameter>hostname</parameter></paramdef>
<paramdef>int <parameter>port</parameter></paramdef>
<paramdef>int <parameter><optional>errno</optional></parameter></paramdef>
<paramdef>string <parameter><optional>errstr</optional></parameter></paramdef>
<paramdef>int
<parameter><optional>errno</optional></parameter>
</paramdef>
<paramdef>string
<parameter><optional>errstr</optional></parameter>
</paramdef>
<paramdef>double
<parameter><optional>timeout</optional></parameter></paramdef>
<parameter><optional>timeout</optional></parameter>
</paramdef>
</funcsynopsis>
<para>
Initiates a stream connection in the Internet (AF_INET) or Unix (AF_UNIX)
domain. For the Internet domain, it will open a TCP socket connection to
<parameter>hostname</parameter> on port <parameter>port</parameter>. For
the Unix domain, <parameter>hostname</parameter> will be used as the path
to the socket, <parameter>port</parameter> must be set to 0 in this case.
The optional <parameter>timeout</parameter> can be used to set a timeout
in seconds for the connect system call.</para>
Initiates a stream connection in the Internet (AF_INET) or Unix
(AF_UNIX) domain. For the Internet domain, it will open a TCP
socket connection to <parameter>hostname</parameter> on port
<parameter>port</parameter>. For the Unix domain,
<parameter>hostname</parameter> will be used as the path to the
socket, <parameter>port</parameter> must be set to 0 in this
case. The optional <parameter>timeout</parameter> can be used to
set a timeout in seconds for the connect system call.
</para>
<para>
<function>fsockopen</function> returns a file pointer which may be used
together with the other file functions (such as
<function>Fsockopen</function> returns a file pointer which may
be used together with the other file functions (such as
<function>fgets</function>, <function>fgetss</function>,
<function>fputs</function>, <function>fclose</function>,
<function>feof</function>).</para>
<function>fputs</function>, <function>fclose</function>, and
<function>feof</function>).
</para>
<para>
If the call fails, it will return false and if the optional
<parameter>errno</parameter> and <parameter>errstr</parameter> arguments
are present they will be set to indicate the actual system level error
that occurred on the system-level connect() call. If the returned errno is
0 and the function returned false, it is an indication that the error
occurred before the connect() call. This is most likely due to a problem
initializing the socket. Note that the errno and errstr arguments must be
passed by reference.</para>
<parameter>errno</parameter> and <parameter>errstr</parameter>
arguments are present they will be set to indicate the actual
system level error that occurred on the system-level
<literal>connect()</literal> call. If the returned errno is 0 and
the function returned false, it is an indication that the error
occurred before the <literal>connect()</literal> call. This is
most likely due to a problem initializing the socket. Note that
the <parameter>errno</parameter> and
<parameter>errstr</parameter> arguments must be passed by
reference.
</para>
<para>
Depending on the environment, the Unix domain or the optional connect
timeout may not be available.</para>
<para>
The socket will by default be opened in blocking mode. You can switch it
to non-blocking mode by using <function>set_socket_blocking</function>.
<example>
<title>fsockopen example</title>
<programlisting>
$fp = fsockopen("www.php.net", 80, &$errno, &$errstr, 30);
if(!$fp) {
echo "$errstr ($errno)&lt;br&gt;\n";
Depending on the environment, the Unix domain or the optional
connect timeout may not be available.
</para>
<para>
The socket will by default be opened in blocking mode. You can
switch it to non-blocking mode by using
<function><function>Set_socket_blocking</function></function>.
<example>
<title><function>Fsockopen</function> Example</title>
<programlisting role="php">
$fp = fsockopen ("www.php.net", 80, &$errno, &$errstr, 30);
if (!$fp) {
echo "$errstr ($errno)&lt;br&gt;\n";
} else {
fputs($fp,"GET / HTTP/1.0\n\n");
while(!feof($fp)) {
echo fgets($fp,128);
}
fclose($fp);
fputs ($fp, "GET / HTTP/1.0\n\n");
while (!feof($fp)) {
echo fgets ($fp,128);
}
fclose ($fp);
}
</programlisting>
</example>
See also: <function>pfsockopen</function></para>
</programlisting>
</example>
See also: <function>pfsockopen</function>
</para>
</refsect1>
</refentry>
<refentry id="function.gethostbyaddr">
<refnamediv>
<refname>gethostbyaddr</refname>
<refpurpose>Get the Internet host name corresponding to a given
IP address.</refpurpose>
<refpurpose>
Get the Internet host name corresponding to a given IP address
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -177,23 +193,23 @@ if(!$fp) {
<funcdef>string <function>gethostbyaddr</function></funcdef>
<paramdef>string <parameter>ip_address</parameter></paramdef>
</funcsynopsis>
<para>
Returns the host name of the Internet host specified by
<parameter>ip_address</parameter>. If an error occurs, returns
<parameter>ip_address</parameter>.</para>
<para>
See also <function>gethostbyname</function>.</para>
<parameter>ip_address</parameter>.
</para>
<para>
See also <function>gethostbyname</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.gethostbyname">
<refnamediv>
<refname>gethostbyname</refname>
<refpurpose>Get the IP address corresponding to a given
Internet host name.</refpurpose>
<refpurpose>
Get the IP address corresponding to a given Internet host name
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -201,22 +217,23 @@ if(!$fp) {
<funcdef>string <function>gethostbyname</function></funcdef>
<paramdef>string <parameter>hostname</parameter></paramdef>
</funcsynopsis>
<para>
Returns the IP address of the Internet host specified by
<parameter>hostname</parameter>.</para>
<para>
See also <function>gethostbyaddr</function>.</para>
<parameter>hostname</parameter>.
</para>
<para>
See also <function>gethostbyaddr</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.gethostbynamel">
<refnamediv>
<refname>gethostbynamel</refname>
<refpurpose>Get a list of IP addresses corresponding to a given
Internet host name.</refpurpose>
<refpurpose>
Get a list of IP addresses corresponding to a given Internet host
name
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -224,27 +241,25 @@ if(!$fp) {
<funcdef>array <function>gethostbynamel</function></funcdef>
<paramdef>string <parameter>hostname</parameter></paramdef>
</funcsynopsis>
<para>
Returns a list of IP addresses to which the Internet host
specified by <parameter>hostname</parameter> resolves.</para>
specified by <parameter>hostname</parameter> resolves.
</para>
<para>
See also
<function>gethostbyname</function>,
<function>gethostbyaddr</function>,
<function>checkdnsrr</function>,
<function>getmxrr</function>, and
the named(8) manual page.</para>
See also <function>gethostbyname</function>,
<function>gethostbyaddr</function>,
<function>checkdnsrr</function>, <function>getmxrr</function>,
and the <literal>named(8)</literal> manual page.
</para>
</refsect1>
</refentry>
<refentry id="function.getmxrr">
<refnamediv>
<refname>getmxrr</refname>
<refpurpose>Get MX records corresponding to a given
Internet host name.</refpurpose>
<refpurpose>
Get MX records corresponding to a given Internet host name
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -252,35 +267,38 @@ if(!$fp) {
<funcdef>int <function>getmxrr</function></funcdef>
<paramdef>string <parameter>hostname</parameter></paramdef>
<paramdef>array <parameter>mxhosts</parameter></paramdef>
<paramdef>array <parameter><optional>weight</optional></parameter></paramdef>
<paramdef>array
<parameter><optional>weight</optional></parameter>
</paramdef>
</funcsynopsis>
<simpara>
Searches DNS for MX records corresponding to
<parameter>hostname</parameter>. Returns true if any records are
found; returns false if no records were found or if an error occurred.</simpara>
found; returns false if no records were found or if an error
occurred.
</simpara>
<simpara>
A list of the MX records found is placed into the array
<parameter>mxhosts</parameter>. If the
<parameter>weight</parameter> array is given, it will be filled
with the weight information gathered.</simpara>
with the weight information gathered.
</simpara>
<simpara>
See also
<function>checkdnsrr</function>,
See also <function>checkdnsrr</function>,
<function>gethostbyname</function>,
<function>gethostbynamel</function>,
<function>gethostbyaddr</function>, and
the named(8) manual page.</simpara>
<function>gethostbyaddr</function>, and the
<literal>named(8)</literal> manual page.
</simpara>
</refsect1>
</refentry>
<refentry id="function.getprotobyname">
<refnamediv>
<refname>getprotobyname</refname>
<refpurpose>get protocol number associated with protocol name</refpurpose>
<refpurpose>
Get protocol number associated with protocol name
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -288,20 +306,23 @@ if(!$fp) {
<funcdef>int <function>getprotobyname</function></funcdef>
<paramdef>string <parameter>name</parameter></paramdef>
</funcsynopsis>
<para>
<function>getprotobyname</function> returns the protocol number
<function>Getprotobyname</function> returns the protocol number
associated with the protocol <parameter>name</parameter> as per
/etc/protocols.
See also <function>getprotobynumber</function>.</para>
</para>
<para>
See also: <function>getprotobynumber</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.getprotobynumber">
<refnamediv>
<refname>getprotobynumber</refname>
<refpurpose>get protocol name associated with protocol number</refpurpose>
<refpurpose>
Get protocol name associated with protocol number
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -309,20 +330,23 @@ if(!$fp) {
<funcdef>string <function>getprotobynumber</function></funcdef>
<paramdef>int <parameter>number</parameter></paramdef>
</funcsynopsis>
<para>
<function>getprotobynumber</function> returns the protocol name
<function>Getprotobynumber</function> returns the protocol name
associated with protocol <parameter>number</parameter> as per
/etc/protocols.
See also <function>getprotobyname</function>.</para>
</para>
<para>
See also: <function>getprotobyname</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.getservbyname">
<refnamediv>
<refname>getservbyname</refname>
<refpurpose>get port number associated with an Internet service and protocol</refpurpose>
<refpurpose>
Get port number associated with an Internet service and protocol
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -331,22 +355,26 @@ if(!$fp) {
<paramdef>string <parameter>service</parameter></paramdef>
<paramdef>string <parameter>protocol</parameter></paramdef>
</funcsynopsis>
<para>
<function>getservbyname</function> returns the Internet port which
corresponds to <parameter>service</parameter> for the specified
<parameter>protocol</parameter> as per /etc/services.
<parameter>protocol</parameter> is either <literal>tcp</literal> or
<literal>udp</literal>.
See also <function>getservbyport</function>.</para>
<function>Getservbyname</function> returns the Internet port
which corresponds to <parameter>service</parameter> for the
specified <parameter>protocol</parameter> as per
<filename>/etc/services</filename>.
<parameter>protocol</parameter> is either <literal>TCP</literal>
or <literal>UDP</literal>.
</para>
<para>
See also: <function>getservbyport</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.getservbyport">
<refnamediv>
<refname>getservbyport</refname>
<refpurpose>get Internet service which corresponds to port and protocol</refpurpose>
<refpurpose>
Get Internet service which corresponds to port and protocol
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -355,22 +383,23 @@ if(!$fp) {
<paramdef>int <parameter>port</parameter></paramdef>
<paramdef>string <parameter>protocol</parameter></paramdef>
</funcsynopsis>
<para>
<function>getservbyport</function> returns the Internet service
associated with <parameter>port</parameter> for the specified
<parameter>protocol</parameter> as per /etc/services.
<parameter>protocol</parameter> is either <literal>tcp</literal> or
<literal>udp</literal>.
See also <function>getservbyname</function>.</para>
<function>Getservbyport</function> returns the Internet service
associated with <parameter>port</parameter> for the specified
<parameter>protocol</parameter> as per /etc/services.
<parameter>protocol</parameter> is either <literal>TCP</literal>
or <literal>UDP</literal>.
</para>
<para>
See also: <function>getservbyname</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.openlog">
<refnamediv>
<refname>openlog</refname>
<refpurpose>open connection to system logger</refpurpose>
<refpurpose>Open connection to system logger</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -380,25 +409,29 @@ if(!$fp) {
<paramdef>int <parameter>option</parameter></paramdef>
<paramdef>int <parameter>facility</parameter></paramdef>
</funcsynopsis>
<para>
<function>openlog</function> opens a connection to the system
<function>Openlog</function> opens a connection to the system
logger for a program. The string <parameter>ident</parameter> is
added to each message. Values for <parameter>option</parameter>
and <parameter>facility</parameter> are given in the next
section. The use of openlog() is optional; It will automatically
be called by <function>syslog</function> if necessary, in which
case ident will default to <literal>false</literal>.
section. The use of <function>openlog</function> is optional; It
will automatically be called by <function>syslog</function> if
necessary, in which case <parameter>ident</parameter> will default
to false.
</para>
<para>
See also <function>syslog</function> and
<function>closelog</function>.</para>
<function>closelog</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.pfsockopen">
<refnamediv>
<refname>pfsockopen</refname>
<refpurpose>Open persistent Internet or Unix domain socket connection.</refpurpose>
<refpurpose>
Open persistent Internet or Unix domain socket connection
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -406,16 +439,22 @@ if(!$fp) {
<funcdef>int <function>pfsockopen</function></funcdef>
<paramdef>string <parameter>hostname</parameter></paramdef>
<paramdef>int <parameter>port</parameter></paramdef>
<paramdef>int <parameter><optional>errno</optional></parameter></paramdef>
<paramdef>string <parameter><optional>errstr</optional></parameter></paramdef>
<paramdef>int
<parameter><optional>errno</optional></parameter>
</paramdef>
<paramdef>string
<parameter><optional>errstr</optional></parameter>
</paramdef>
<paramdef>int
<parameter><optional>timeout</optional></parameter></paramdef>
<parameter><optional>timeout</optional></parameter>
</paramdef>
</funcsynopsis>
<para>
This function behaves exactly as <function>fsockopen</function> with the
difference that the connection is not closed after the script finishes.
It is the persistent version of <function>fsockopen</function>.</para>
This function behaves exactly as <function>fsockopen</function>
with the difference that the connection is not closed after the
script finishes. It is the persistent version of
<function>fsockopen</function>.
</para>
</refsect1>
</refentry>
@ -436,17 +475,17 @@ if(!$fp) {
descriptor will be switched to non-blocking mode, and if true, it
will be switched to blocking mode. This affects calls like
<function>fgets</function> that read from the socket. In
non-blocking mode an fgets() call will always return right away
while in blocking mode it will wait for data to become available
on the socket.</para>
non-blocking mode an <function>fgets</function> call will always
return right away while in blocking mode it will wait for data to
become available on the socket.
</para>
</refsect1>
</refentry>
<refentry id="function.syslog">
<refnamediv>
<refname>syslog</refname>
<refpurpose>generate a system log message</refpurpose>
<refpurpose>Generate a system log message</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -456,24 +495,28 @@ if(!$fp) {
<paramdef>string <parameter>message</parameter></paramdef>
</funcsynopsis>
<para>
<function>syslog</function> generates a log message that will be
<function>Syslog</function> generates a log message that will be
distributed by the system logger.
<parameter>priority</parameter> is a combination of the facility
and the level, values for which are given in the next section.
The remaining argument is the message to send, except that the
two characters <literal>%m</literal> will be replaced by the
error message string (strerror) corresponding to the present
value of <errortype>errno</errortype>.</para>
value of <errortype>errno</errortype>.
</para>
<para>
More information on the syslog facilities can be found in
the man pages for syslog on Unix machines.</para>
More information on the syslog facilities can be found in the man
pages for syslog on Unix machines.
</para>
<para>
On Windows NT, the syslog service is emulated using the
Event Log.</para>
On Windows NT, the syslog service is emulated using the Event
Log.
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@ -484,7 +527,7 @@ sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../manual.ced"
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil