Patrick is right in that you can use CURL to do this, but as of PHP 4.3.0, you can use https:// if you have compiled in OpenSSL support.
On Tuesday 23 July 2002 11:56 am, Josh Levine wrote: > I'm trying to connect to a Java application that's listening on a socket > using SSL. I am trying to use fsockopen with the address beginning with > ssl://, but it doesn't work. There's no error message that I can find, > it just doesn't create the file-handler. > > Here's some sample code: > > <? > $hostname = 'ssl://155.246.211.23'; > $portnumb = '60324'; > > $sock = fsockopen($hostname, $portnumb, $errno, $errstr); > > fwrite($sock, "9\n"); > print ( fgets($sock,6) ); > print $errno; > print $errstr; > fclose($sock); > ?> > > That returns: > > Warning: fwrite(): supplied argument is not a valid File-Handle resource > in /usr/home/research/htdocs/tests/secure.php on line 8 > > Warning: fgets(): supplied argument is not a valid File-Handle resource > in /usr/home/research/htdocs/tests/secure.php on line 10 > 0 > Warning: fclose(): supplied argument is not a valid File-Handle resource > in /usr/home/research/htdocs/tests/secure.php on line 20 > > Thanks in advance for any help, > Josh Levine -- Think not those faithful who praise all thy words and actions, but those who kindly reprove thy faults. Socrates -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php