note 29445 added to function.socket-bind
| From: | masuod_a at hotmail dot com | Date: | Thu, 13 Feb 2003 21:31:23 +0000 |
| Subject: | note 29445 added to function.socket-bind | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-43897@lists.php.net to get a copy of this message | ||
if you want to connect to server by specified port and you don't know your ip address or you
have multiple interface for connecting to network , you can bind null instead of valid ip address
like this :
$socket=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
$local_port=1023;
socket_bind($socket,null,$local_port);
socket_connect($socket,$remote_host,$remote_port);
--
http://www.php.net/manual/en/function.socket-bind.php
http://master.php.net/manage/user-notes.php?action=edit+29445
http://master.php.net/manage/user-notes.php?action=delete+29445
http://master.php.net/manage/user-notes.php?action=reject+29445