php-doc-en/reference/network/functions/getmxrr.xml
2004-11-10 08:30:50 +00:00

82 lines
2.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.12 $ -->
<!-- splitted from ./en/functions/network.xml, last change in rev 1.2 -->
<refentry id="function.getmxrr">
<refnamediv>
<refname>getmxrr</refname>
<refpurpose>
Get MX records corresponding to a given Internet host name
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>getmxrr</methodname>
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
<methodparam><type>array</type><parameter role="reference">mxhosts</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter role="reference">weight</parameter></methodparam>
</methodsynopsis>
<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>
<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>
<para>
<note>
<simpara>
This function should not be used for the purposes of address
verification. Only the mailexchangers found in DNS are returned,
however, according to <ulink url="&url.rfc;2821">RFC 2821</ulink>
when no mail exchangers are listed, <parameter>hostname</parameter>
itself should be used as the only mail exchanger with a priority of
<literal>0</literal>.
</simpara>
</note>
</para>
<para>
<note>
<simpara>
This function is not implemented on Windows platforms. Try the
<ulink url="&url.php.pear;">PEAR</ulink> class
<ulink url="&url.pear.package;Net_DNS">Net_DNS</ulink>.
</simpara>
</note>
</para>
<simpara>
See also <function>checkdnsrr</function>,
<function>dns_get_record</function>,
<function>gethostbyname</function>,
<function>gethostbynamel</function>,
<function>gethostbyaddr</function>, and the
<literal>named(8)</literal> manual page.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->