API SSL

Hi people,

We wrote several PHP scripts with API. It wonderfull because you can do everything.
However, I have just tried to add a SSL certificate. I does not work.

Is there any special issue or CS sign to work with a SSL certificate in API -SSL?

Thanks,

Santiago

When you say “it doesn’t work”… It’s not connecting, or does it hand/terminate suddenly and (seemingly) randomly?

Due to problems with PHP itself (primarily this one), encrypted PHP streams do not work reliably, and thus they could disconnect suddenly in the middle of your script.

However, if you can’t even connect, that could be of various other reasons. Most notably, if you’re using a certificate, you need to supply a context where you specify how the certificate is validated. See this page for an example.