cvs: phpdoc-cs /reference/network reference.xml /reference/network/functions checkdnsrr.xml closelog.xml debugger-off.xml debugger-on.xml
define-syslog-variables.xml fsockopen.xml
| From: | Lukas Jelinek | Date: | Thu, 13 Jun 2002 22:40:52 +0000 |
| Subject: | cvs: phpdoc-cs /reference/network reference.xml /reference/network/functions checkdnsrr.xml closelog.xml debugger-off.xml debugger-on.xml define-syslog-variables.xml fsockopen.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969346453@lists.php.net to get a copy of this message | ||
luk Thu Jun 13 18:40:52 2002 EDT
Added files:
/phpdoc-cs/reference/network reference.xml
/phpdoc-cs/reference/network/functions checkdnsrr.xml closelog.xml
debugger-off.xml
debugger-on.xml
define-syslog-variables.xml
fsockopen.xml
Log:
Index: phpdoc-cs/reference/network/reference.xml +++ phpdoc-cs/reference/network/reference.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <reference id="ref.network"> <title>Sí»ové funkce</title> <titleabbrev>Sí»</titleabbrev> &reference.network.functions; </reference> <!-- 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: --> Index: phpdoc-cs/reference/network/functions/checkdnsrr.xml +++ phpdoc-cs/reference/network/functions/checkdnsrr.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.checkdnsrr"> <refnamediv> <refname>checkdnsrr</refname> <refpurpose> Ovìøí DNS záznamy odpovídající danému názvu poèítaèe na Internetu nebo jeho IP adrese. </refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>checkdnsrr</methodname> <methodparam><type>string</type><parameter>host</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>type</parameter></methodparam> </methodsynopsis> <simpara> Prohledá DNS na záznamy typu <parameter>type</parameter>, odpovídající názvu <parameter>host</parameter>. Vrací &true;, pokud najde nìjaké záznamy a &false;, pokud nic nenajde nebo nastane chyba. </simpara> <simpara> <parameter>type</parameter> mù¾e být jeden z tìchto: A, MX, NS, SOA, PTR, CNAME, or ANY. Implicitní je MX. </simpara> <simpara> <parameter>Host</parameter> mù¾e být jak IP adresa (v "teèkové" notaci), tak název stroje. </simpara> ¬e.no-windows; <simpara> Viz také <function>getmxrr</function>, <function>gethostbyaddr</function>, <function>gethostbyname</function>, <function>gethostbynamel</function>, a manuálovou stránku named(8). </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: --> Index: phpdoc-cs/reference/network/functions/closelog.xml +++ phpdoc-cs/reference/network/functions/closelog.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.closelog"> <refnamediv> <refname>closelog</refname> <refpurpose>Zavøe spojení do systémového protokolu</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>closelog</methodname> <void/> </methodsynopsis> <para> <function>closelog</function> zavøe deskriptor pou¾itý k zápisu do systémového protokolu. Pou¾ití <function>closelog</function> je nepovinné. </para> <para> Viz také <function>define_syslog_variables</function>, <function>syslog</function> a <function>openlog</function>. </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: --> Index: phpdoc-cs/reference/network/functions/debugger-off.xml +++ phpdoc-cs/reference/network/functions/debugger-off.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.debugger-off"> <refnamediv> <refname>debugger_off</refname> <refpurpose>Vypne vnitøní PHP debugger</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>debugger_off</methodname> <void/> </methodsynopsis> <para> Vypne vnitøní PHP debugger. Na debuggeru stále probíhá vývoj. </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: --> Index: phpdoc-cs/reference/network/functions/debugger-on.xml +++ phpdoc-cs/reference/network/functions/debugger-on.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.debugger-on"> <refnamediv> <refname>debugger_on</refname> <refpurpose>Zapne vnitøní PHP debugger</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>debugger_on</methodname> <methodparam><type>string</type><parameter>address</parameter></methodparam> </methodsynopsis> <para> Zapne vnitøní PHP debugger s pøipojením na <parameter>address</parameter>. Na debuggeru stále probíhá vývoj. </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: --> Index: phpdoc-cs/reference/network/functions/define-syslog-variables.xml +++ phpdoc-cs/reference/network/functions/define-syslog-variables.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.define-syslog-variables"> <refnamediv> <refname>define_syslog_variables</refname> <refpurpose>Inicializuje v¹echny konstanty související se systémovým protokolem</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>void</type><methodname>define_syslog_variables</methodname> <void/> </methodsynopsis> <para> Inicializuje v¹echny konstanty pou¾ité ve funkcích systémového protokolu. </para> <para> Viz také <function>openlog</function>, <function>syslog</function> a <function>closelog</function>. </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: --> Index: phpdoc-cs/reference/network/functions/fsockopen.xml +++ phpdoc-cs/reference/network/functions/fsockopen.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.fsockopen"> <refnamediv> <refname>fsockopen</refname> <refpurpose> Otevøe socketové spojení v internetové nebo unixové doménì. </refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>fsockopen</methodname> <methodparam><type>string</type><parameter>hostname</parameter></methodparam> <methodparam><type>int</type><parameter>port</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>errno</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>errstr</parameter></methodparam> <methodparam choice="opt"><type>float</type><parameter>timeout</parameter></methodparam> </methodsynopsis> <para> Iniciuje proudové spojení v internetové (AF_INET, za pou¾ití TCP nebo UDP) nebo unixové (AF_UNIX) doménì. Pro internetovou doménu otevøe TCP kanál na stroj <parameter>hostname</parameter> na port <parameter>port</parameter>. <parameter>hostname</parameter> v takovém pøípadì mù¾e být plnì urèené doménové jméno nebo IP adresa. Pro spojení UDP musíte explicitnì specifikovat protokol pøedøazením '<literal>udp://</literal>' pøed <parameter>hostname</parameter>. V unixové doménì se <parameter>hostname</parameter> pou¾ije jako cesta k socketu <parameter>port</parameter> se pak musí nastavit na 0. Nepovinný parametr <parameter>timeout</parameter> se mù¾e pou¾ít k nastavení time-outu pro systémové volání connect. </para> <para> Od PHP 4.3.0, pokud jste PHP zkompilovali s podporou OpenSSL, mù¾ete pøed <parameter>hostname</parameter> pøedøadit '<literal>ssl://</literal>' nebo '<literal>tls://</literal>' pro pou¾ití SSL nebo TSL spojení na vzdálený stroj pøes TCP/IP. </para> <para> <function>fsockopen</function> vrací deskriptor souboru, který lze pou¾ít s jinými souborovými funkcemi (napø. <function>fgets</function>, <function>fgetss</function>, <function>fputs</function>, <function>fclose</function> a <function>feof</function>). </para> <para> Pokud volání sel¾e, vrací funkce &false;, a pokud jsou pøítomny nepovinné parametry <parameter>errno</parameter> a <parameter>errstr</parameter>, budou nastaveny na aktuální chybovou úroveò v systémovém volání <literal>connect()</literal>. Je-li vrácená hodnota v <parameter>errno</parameter> rovna <literal>0</literal> a funkce vrátila &false;, znamená to, ¾e chyba nastala pøed voláním <literal>connect()</literal>. Nejèastìji je to kvùli problému pøi inicializaci socketu. Uvìdomte si, ¾e argumenty <parameter>errno</parameter> a <parameter>errstr</parameter> se v¾dy pøedávají odkazem. </para> <para> V závislosti na prostøedí nemusí být k dispozici unixová doména nebo volitelný parametr timeout. </para> <para> Socket se implicitnì otevøe v blokujícím re¾imu. Do neblokujícího re¾imu ho mù¾ete pøepnout pou¾itím <function>socket_set_blocking</function>. <example> <title><function>fsockopen</function> Pøíklad</title> <programlisting role="php"> <![CDATA[ <?php $fp = fsockopen ("www.example.com", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { fputs ($fp, "GET / HTTP/1.0\r\nHost: www.example.com\r\n\r\n"); while (!feof($fp)) { echo fgets ($fp,128); } fclose ($fp); } ?> ]]> </programlisting> </example> Dal¹í (ní¾e uvedený) pøíklad ukazuje, jak získat datum a èas z UDP slu¾by "daytime" (port 13) na va¹em vlastním poèítaèi. <example> <title>Pou¾ití UDP spojení</title> <programlisting role="php"> <![CDATA[ <?php $fp = fsockopen("udp://127.0.0.1", 13, $errno, $errstr); if (!$fp) { echo "CHYBA: $errno - $errstr<br>\n"; } else { fwrite($fp,"\n"); echo fread($fp, 26); fclose($fp); } ?> ]]> </programlisting> </example> <note> <para>Parametr timeout by zaveden v PHP 3.0.9 a podpora UDP v PHP 4. </para> </note> Viz také <function>pfsockopen</function>, <function>socket_set_blocking</function>, <function>socket_set_timeout</function>, <function>fgets</function>, <function>fgetss</function>, <function>fputs</function>, <function>fclose</function>, <function>feof</function> a <link linkend="ref.curl">roz¹íøení Curl</link>. </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: -->
Index: phpdoc-cs/reference/network/reference.xml +++ phpdoc-cs/reference/network/reference.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <reference id="ref.network"> <title>Sí»ové funkce</title> <titleabbrev>Sí»</titleabbrev> &reference.network.functions; </reference> <!-- 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: --> Index: phpdoc-cs/reference/network/functions/checkdnsrr.xml +++ phpdoc-cs/reference/network/functions/checkdnsrr.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.checkdnsrr"> <refnamediv> <refname>checkdnsrr</refname> <refpurpose> Ovìøí DNS záznamy odpovídající danému názvu poèítaèe na Internetu nebo jeho IP adrese. </refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>checkdnsrr</methodname> <methodparam><type>string</type><parameter>host</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>type</parameter></methodparam> </methodsynopsis> <simpara> Prohledá DNS na záznamy typu <parameter>type</parameter>, odpovídající názvu <parameter>host</parameter>. Vrací &true;, pokud najde nìjaké záznamy a &false;, pokud nic nenajde nebo nastane chyba. </simpara> <simpara> <parameter>type</parameter> mù¾e být jeden z tìchto: A, MX, NS, SOA, PTR, CNAME, or ANY. Implicitní je MX. </simpara> <simpara> <parameter>Host</parameter> mù¾e být jak IP adresa (v "teèkové" notaci), tak název stroje. </simpara> ¬e.no-windows; <simpara> Viz také <function>getmxrr</function>, <function>gethostbyaddr</function>, <function>gethostbyname</function>, <function>gethostbynamel</function>, a manuálovou stránku named(8). </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: --> Index: phpdoc-cs/reference/network/functions/closelog.xml +++ phpdoc-cs/reference/network/functions/closelog.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.closelog"> <refnamediv> <refname>closelog</refname> <refpurpose>Zavøe spojení do systémového protokolu</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>closelog</methodname> <void/> </methodsynopsis> <para> <function>closelog</function> zavøe deskriptor pou¾itý k zápisu do systémového protokolu. Pou¾ití <function>closelog</function> je nepovinné. </para> <para> Viz také <function>define_syslog_variables</function>, <function>syslog</function> a <function>openlog</function>. </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: --> Index: phpdoc-cs/reference/network/functions/debugger-off.xml +++ phpdoc-cs/reference/network/functions/debugger-off.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.debugger-off"> <refnamediv> <refname>debugger_off</refname> <refpurpose>Vypne vnitøní PHP debugger</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>debugger_off</methodname> <void/> </methodsynopsis> <para> Vypne vnitøní PHP debugger. Na debuggeru stále probíhá vývoj. </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: --> Index: phpdoc-cs/reference/network/functions/debugger-on.xml +++ phpdoc-cs/reference/network/functions/debugger-on.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.debugger-on"> <refnamediv> <refname>debugger_on</refname> <refpurpose>Zapne vnitøní PHP debugger</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>debugger_on</methodname> <methodparam><type>string</type><parameter>address</parameter></methodparam> </methodsynopsis> <para> Zapne vnitøní PHP debugger s pøipojením na <parameter>address</parameter>. Na debuggeru stále probíhá vývoj. </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: --> Index: phpdoc-cs/reference/network/functions/define-syslog-variables.xml +++ phpdoc-cs/reference/network/functions/define-syslog-variables.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.define-syslog-variables"> <refnamediv> <refname>define_syslog_variables</refname> <refpurpose>Inicializuje v¹echny konstanty související se systémovým protokolem</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>void</type><methodname>define_syslog_variables</methodname> <void/> </methodsynopsis> <para> Inicializuje v¹echny konstanty pou¾ité ve funkcích systémového protokolu. </para> <para> Viz také <function>openlog</function>, <function>syslog</function> a <function>closelog</function>. </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: --> Index: phpdoc-cs/reference/network/functions/fsockopen.xml +++ phpdoc-cs/reference/network/functions/fsockopen.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: luk Status: ready --> <refentry id="function.fsockopen"> <refnamediv> <refname>fsockopen</refname> <refpurpose> Otevøe socketové spojení v internetové nebo unixové doménì. </refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>fsockopen</methodname> <methodparam><type>string</type><parameter>hostname</parameter></methodparam> <methodparam><type>int</type><parameter>port</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>errno</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>errstr</parameter></methodparam> <methodparam choice="opt"><type>float</type><parameter>timeout</parameter></methodparam> </methodsynopsis> <para> Iniciuje proudové spojení v internetové (AF_INET, za pou¾ití TCP nebo UDP) nebo unixové (AF_UNIX) doménì. Pro internetovou doménu otevøe TCP kanál na stroj <parameter>hostname</parameter> na port <parameter>port</parameter>. <parameter>hostname</parameter> v takovém pøípadì mù¾e být plnì urèené doménové jméno nebo IP adresa. Pro spojení UDP musíte explicitnì specifikovat protokol pøedøazením '<literal>udp://</literal>' pøed <parameter>hostname</parameter>. V unixové doménì se <parameter>hostname</parameter> pou¾ije jako cesta k socketu <parameter>port</parameter> se pak musí nastavit na 0. Nepovinný parametr <parameter>timeout</parameter> se mù¾e pou¾ít k nastavení time-outu pro systémové volání connect. </para> <para> Od PHP 4.3.0, pokud jste PHP zkompilovali s podporou OpenSSL, mù¾ete pøed <parameter>hostname</parameter> pøedøadit '<literal>ssl://</literal>' nebo '<literal>tls://</literal>' pro pou¾ití SSL nebo TSL spojení na vzdálený stroj pøes TCP/IP. </para> <para> <function>fsockopen</function> vrací deskriptor souboru, který lze pou¾ít s jinými souborovými funkcemi (napø. <function>fgets</function>, <function>fgetss</function>, <function>fputs</function>, <function>fclose</function> a <function>feof</function>). </para> <para> Pokud volání sel¾e, vrací funkce &false;, a pokud jsou pøítomny nepovinné parametry <parameter>errno</parameter> a <parameter>errstr</parameter>, budou nastaveny na aktuální chybovou úroveò v systémovém volání <literal>connect()</literal>. Je-li vrácená hodnota v <parameter>errno</parameter> rovna <literal>0</literal> a funkce vrátila &false;, znamená to, ¾e chyba nastala pøed voláním <literal>connect()</literal>. Nejèastìji je to kvùli problému pøi inicializaci socketu. Uvìdomte si, ¾e argumenty <parameter>errno</parameter> a <parameter>errstr</parameter> se v¾dy pøedávají odkazem. </para> <para> V závislosti na prostøedí nemusí být k dispozici unixová doména nebo volitelný parametr timeout. </para> <para> Socket se implicitnì otevøe v blokujícím re¾imu. Do neblokujícího re¾imu ho mù¾ete pøepnout pou¾itím <function>socket_set_blocking</function>. <example> <title><function>fsockopen</function> Pøíklad</title> <programlisting role="php"> <![CDATA[ <?php $fp = fsockopen ("www.example.com", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { fputs ($fp, "GET / HTTP/1.0\r\nHost: www.example.com\r\n\r\n"); while (!feof($fp)) { echo fgets ($fp,128); } fclose ($fp); } ?> ]]> </programlisting> </example> Dal¹í (ní¾e uvedený) pøíklad ukazuje, jak získat datum a èas z UDP slu¾by "daytime" (port 13) na va¹em vlastním poèítaèi. <example> <title>Pou¾ití UDP spojení</title> <programlisting role="php"> <![CDATA[ <?php $fp = fsockopen("udp://127.0.0.1", 13, $errno, $errstr); if (!$fp) { echo "CHYBA: $errno - $errstr<br>\n"; } else { fwrite($fp,"\n"); echo fread($fp, 26); fclose($fp); } ?> ]]> </programlisting> </example> <note> <para>Parametr timeout by zaveden v PHP 3.0.9 a podpora UDP v PHP 4. </para> </note> Viz také <function>pfsockopen</function>, <function>socket_set_blocking</function>, <function>socket_set_timeout</function>, <function>fgets</function>, <function>fgetss</function>, <function>fputs</function>, <function>fclose</function>, <function>feof</function> a <link linkend="ref.curl">roz¹íøení Curl</link>. </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: -->