note 40884 added to function.stream-socket-get-name
| From: | peetah at adsl dot no | Date: | Thu, 18 Mar 2004 04:59:32 +0000 |
| Subject: | note 40884 added to function.stream-socket-get-name | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66996@lists.php.net to get a copy of this message | ||
This function might seem confusing; But here's an example of retrieving the IPaddress of the
connecting client:
$ip = stream_get_socket_name($connection, TRUE);
print("IP: $ip");
// Returned: IP: 192.168.1.33 (Client Address)
While this example will retrieve the server address:
$ip = stream_get_socket_name($connection, FALSE);
print("IP: $ip");
// Returned: IP: 192.168.1.34 (Server Address)
----
Manual Page -- http://www.php.net/manual/en/function.stream-socket-get-name.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40884
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40884&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40884&report=yes
Search -- http://master.php.net/manage/user-notes.php