curl-and-php
Can / how do to this with curl, bind IP connect to ssl server
Date: Sat, 19 Apr 2008 16:32:29 +0100
Hi Im trying to find an alternative way to do this ...
$bindip = 'xx.xx.xx.xx'; // IP to use
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_bind($sock, $bindip);
socket_connect($sock, 'ssl://epp.server.com', 700); // connect to ssl server
$response = socket_read($socket,2046,PHP_NORMAL_READ);
echo $response;
The above does not work as the socket function does not understand ssl:// in
the destination address.
Also if I try connect at the IP it fails as the destination rejects the
connection without using the ssl://
ie using..
socket_connect($socket_handle, gethostbyname('epp.server.com'), 700)
Is it possible to do the above through Curl. Bind an IP and then connect to
ssl://epp.server.com 700 ?
Fsockopen on its own does not allow me to bind an address.
Thanks
Alan
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-04-19