diff --git a/reference/sockets/functions/socket-bind.xml b/reference/sockets/functions/socket-bind.xml index c40755c1c8..6a1ac7b7bb 100644 --- a/reference/sockets/functions/socket-bind.xml +++ b/reference/sockets/functions/socket-bind.xml @@ -1,5 +1,5 @@ - + socket_bind @@ -42,7 +42,7 @@ If the socket is of the AF_UNIX family, the - address is the pathname of a + address is the path of a Unix-domain socket (e.g. /tmp/my.sock). @@ -70,14 +70,6 @@ This code may be passed to socket_strerror to get a textual explanation of the error. - - - Windows 9x/ME compatability note: - socket_last_error may return an invalid error code - if trying to bind the socket to a wrong address that does not belong to - your machine. - - @@ -96,14 +88,14 @@ $sourceips['kevin'] = '127.0.0.1'; $sourceips['madcoder'] = '127.0.0.2'; // Bind the source address -socket_bind($sock, $computerips['madcoder']); +socket_bind($sock, $sourceips['madcoder']); // Connect to destination address socket_connect($sock, '127.0.0.1', 80); // Write $request = 'GET / HTTP/1.1' . "\r\n" . - 'Host: example.com' . "\r\n\"; + 'Host: example.com' . "\r\n\r\n"; socket_write($sock, $request); // Close @@ -124,6 +116,14 @@ socket_close($sock); socket_connect. + + + Windows 9x/ME compatibility note: + socket_last_error may return an invalid error code + if trying to bind the socket to a wrong address that does not belong to + your machine. + +