How can my program link to an https site?

Hi,

I'm trying to find out how I can log on and interact with an https website. I've worked out so far that my program will be acting pretty much like a browser i.e. I don't need to install any special software like OpenSSL as that is for the server side of things.

However, I don't know how a browser does the secure bit, so can anyone enlighten me as to how I can do this with my program? Does PHP have any built-in commands to help with this sort of thing?

Debbie
[513 byte] By [Debbie-Leigh] at [2007-11-19 12:14:42]
# 1 Re: How can my program link to an https site?
Hi,

I'm trying to find out how I can log on and interact with an https website. I've worked out so far that my program will be acting pretty much like a browser i.e. I don't need to install any special software like OpenSSL as that is for the server side of things.

However, I don't know how a browser does the secure bit, so can anyone enlighten me as to how I can do this with my program? Does PHP have any built-in commands to help with this sort of thing?

Debbie

You could use curl http://curl.haxx.se/
The other option is of course to use sockets directly, which of course requires detailed understanding of the https protocol.
khp at 2007-11-10 3:58:14 >
# 2 Re: How can my program link to an https site?
I don't have control over what gets compiled on my host company's computer and the application I'm developing will be used by other people, so I can't be sure whether they will have OpenSSL compiled in, so I can't use any extra software or command line programs to do this. It has to be done totally within PHP.

I know I can use fopen to connect successfully to an https site, but I need to know how to format the messages from then on so I can send and receive the encrypted data that is sent and received by the https server.

So does anyone know how to do this or know of any site that explains how to do this?

Debbie
Debbie-Leigh at 2007-11-10 3:59:20 >
# 3 Re: How can my program link to an https site?
I don't have control over what gets compiled on my host company's computer and the application I'm developing will be used by other people, so I can't be sure whether they will have OpenSSL compiled in, so I can't use any extra software or command line programs to do this. It has to be done totally within PHP.

I know I can use fopen to connect successfully to an https site, but I need to know how to format the messages from then on so I can send and receive the encrypted data that is sent and received by the https server.

So does anyone know how to do this or know of any site that explains how to do this?

Debbie

Sockets are the easy part. But if you don't have an encryption library what are you going to do? Write your own in PHP? Good luck with that.

Get an SSL library installed to do it for you or revisit your requirements. What you are describing is not practical.
PublicService at 2007-11-10 4:00:18 >