1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id='function.tld_check'>
<refnamediv>
<refname>tld_check</refname>
<refpurpose>
Verify TLD character restriction conformance
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>tld_check</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam><type>int</type><parameter>errpos</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>charset</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>tld</parameter></methodparam>
</methodsynopsis>
<para>
Checks whether or not <parameter>string</parameter> conforms to the restrictions on the sets
of valid characters defined by TLD authorities around the World. Treats
<parameter>string</parameter> as a hostname if <parameter>tld</parameter> is not present, determining the TLD
from the hostname. If <parameter>tld</parameter> is present, uses the restrictions defined
by the parties responsible for TLD <parameter>tld</parameter>. <parameter>charset</parameter> may be used to
specify the character set the <parameter>string</parameter> is in. Should an invalid character
be detected, returns FALSE and the 0-based position of the offending character
in reference <parameter>errpos</parameter>. In case of other failure conditions, <parameter>errpos</parameter> is not touched,
and NULL is returned. Should <parameter>string</parameter> conform to the TLD restrictions,
TRUE is returned.
</para>
<para>
<function>tld_check</function> returns TRUE, FALSE or NULL.
<example>
<title>An example</title>
<programlisting role="php">
<![CDATA[
<?php
echo tld_check('php.se', &$errpos, 'ISO-8859-1');
?>
]]>
</programlisting>
</example>
</para>
</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
-->
|