Re: secure sockets
| From: | Josh Levine | Date: | Wed, 24 Jul 2002 01:09:15 +0000 |
| Subject: | Re: secure sockets | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-109181@lists.php.net to get a copy of this message | ||
The docs for fsockopen() say I should use ssl:// (the docs for fopen()
say to use https:// for a secure HTTP 1.0, which I don't want). I can
go ahead and try it, though...
--Josh Levine
Peter wrote:
>
> josh just a query did u try it with https:// rather than
> ssl:// ?
>
> > -----Original Message-----
> > From: Josh Levine [mailto:joshl-php@levindustries.com]
> > Sent: Wednesday, 24 July 2002 9:53 AM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] secure sockets
> >
> >
> > Thanks for the pointer! I had looked at it, but didn't see too much
> > information on using CURL with a telnet type application. I'll take a
> > closer look at it.
> >
> > --Josh Levine
> >
> >
> > Patrick Lynch wrote:
> > >
> > > Hi Josh,
> > >
> > > I have not done this myself but afaik, you can use curl to so this.
> > > http://www.php.net/manual/en/ref.curl.php
> > >
> > > Best Regards,
> > > Patrick Lynch.
> > >
> > > Optip Ltd, Internet & Mobile Development
> > > Co. Clare, Ireland.
> > > http://www.optip.com/
> > >
> > > -----Original Message-----
> > > From: Josh Levine [mailto:joshl-php@levindustries.com]
> > > Sent: 23 July 2002 19:57
> > > To: php-general@lists.php.net
> > > Subject: [PHP] secure sockets
> > >
> > > 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
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >