socket_bind to an ssl:// address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux