reference/network/functions/fsockopen.xml
4e6f0774f03131cbeeb8c21019a690bf97fd22b6
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.fsockopen">
3
+
<refentry xml:id="function.fsockopen" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>fsockopen</refname>
6
6
<refpurpose>Open Internet or Unix domain socket connection</refpurpose>
...
...
@@ -9,12 +9,12 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>resource</type><methodname>fsockopen</methodname>
12
+
<type class="union"><type>resource</type><type>false</type></type><methodname>fsockopen</methodname>
13
13
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
14
14
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>-1</initializer></methodparam>
15
-
<methodparam choice="opt"><type>int</type><parameter role="reference">errno</parameter></methodparam>
16
-
<methodparam choice="opt"><type>string</type><parameter role="reference">errstr</parameter></methodparam>
17
-
<methodparam choice="opt"><type>float</type><parameter>timeout</parameter><initializer>ini_get("default_socket_timeout")</initializer></methodparam>
15
+
<methodparam choice="opt"><type>int</type><parameter role="reference">error_code</parameter><initializer>&null;</initializer></methodparam>
16
+
<methodparam choice="opt"><type>string</type><parameter role="reference">error_message</parameter><initializer>&null;</initializer></methodparam>
17
+
<methodparam choice="opt"><type class="union"><type>float</type><type>null</type></type><parameter>timeout</parameter><initializer>&null;</initializer></methodparam>
18
18
</methodsynopsis>
19
19
<para>
20
20
Initiates a socket connection to the resource specified by
...
...
@@ -63,14 +63,14 @@
63
63
</listitem>
64
64
</varlistentry>
65
65
<varlistentry>
66
-
<term><parameter>errno</parameter></term>
66
+
<term><parameter>error_code</parameter></term>
67
67
<listitem>
68
68
<para>
69
69
If provided, holds the system level error number that occurred in the
70
70
system-level <literal>connect()</literal> call.
71
71
</para>
72
72
<para>
73
-
If the value returned in <parameter>errno</parameter> is
73
+
If the value returned in <parameter>error_code</parameter> is
74
74
<literal>0</literal> and the function returned &false;, it is an
75
75
indication that the error occurred before the
76
76
<literal>connect()</literal> call. This is most likely due to a
...
...
@@ -79,7 +79,7 @@
79
79
</listitem>
80
80
</varlistentry>
81
81
<varlistentry>
82
-
<term><parameter>errstr</parameter></term>
82
+
<term><parameter>error_message</parameter></term>
83
83
<listitem>
84
84
<para>
85
85
The error message as a string.
...
...
@@ -90,7 +90,8 @@
90
90
<term><parameter>timeout</parameter></term>
91
91
<listitem>
92
92
<para>
93
-
The connection timeout, in seconds.
93
+
The connection timeout, in seconds. When &null;, the
94
+
<link linkend="ini.default-socket-timeout">default_socket_timeout</link> &php.ini; setting is used.
94
95
</para>
95
96
<note>
96
97
<para>
...
...
@@ -123,36 +124,29 @@
123
124
not a valid domain.
124
125
</para>
125
126
</refsect1>
126
-
<refsect1 role="changelog">
127
+

128
+
<refsect1 role="changelog"><!-- {{{ -->
127
129
&reftitle.changelog;
128
-
<para>
129
-
<informaltable>
130
-
<tgroup cols="2">
131
-
<thead>
132
-
<row>
133
-
<entry>&Version;</entry>
134
-
<entry>&Description;</entry>
135
-
</row>
136
-
</thead>
137
-
<tbody>
138
-
<row>
139
-
<entry>4.3.0</entry>
140
-
<entry>
141
-
Added support for the <parameter>timeout</parameter> parameter on
142
-
win32.
143
-
</entry>
144
-
</row>
145
-
<row>
146
-
<entry>4.3.0</entry>
147
-
<entry>
148
-
SSL and TLS over TCP/IP support was added.
149
-
</entry>
150
-
</row>
151
-
</tbody>
152
-
</tgroup>
153
-
</informaltable>
154
-
</para>
130
+
<informaltable>
131
+
<tgroup cols="2">
132
+
<thead>
133
+
<row>
134
+
<entry>&Version;</entry>
135
+
<entry>&Description;</entry>
136
+
</row>
137
+
</thead>
138
+
<tbody>
139
+
<row>
140
+
<entry>8.0.0</entry>
141
+
<entry>
142
+
<parameter>timeout</parameter> is nullable now.
143
+
</entry>
144
+
</row>
145
+
</tbody>
146
+
</tgroup>
147
+
</informaltable>
155
148
</refsect1>
149
+

156
150
<refsect1 role="examples">
157
151
&reftitle.examples;
158
152
<para>
159
153