socket_bind to an ssl:// address

From: Date: Sun, 04 Sep 2011 15:19:30 +0000
Subject: socket_bind to an ssl:// address
Groups: php.general 
Request: Send a blank email to php-general+get-314717@lists.php.net to get a copy of this message
Hi ive been using this no problems $sourceip = 'xx.xx.xx.xx'; //IP to bind $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($sock, $sourceip); socket_connect($sock, 'dac.nic.uk', 3043); But I need to connect to ssl://epp.nominet.org.uk:700 and this fails as it does not understand the ssl:// part. I tried to do this using streams , if (function_exists('stream_context_create') && function_exists('stream_socket_client')) $socket_options = array('socket' => array('bindto' => 'xx.xx.xx.xx') $socket_context = stream_context_create($socket_options) $socket = stream_socket_client('ssl://epp.nominet.org.uk:700', $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $socket_context); but whenever I connect the remote connection still see's me as my servers main IP rather then then IP im trying to bind.

« previous php.general (#314717) next »