Search code examples
phpcurlftps

PHP FTPS with Certificate


I'm looking for a way to connect to a FTPS server from PHP and I need to send a client certificate. I looked at the related questions, but they don't answer the question:

How to use a Client Certificate with ftp_ssl_connect Connecting to FTPS using PHP and certificate as auth

I now connect using ftp_ssl_connect but I don't see a way to send a certificate. Is the only possibility to rewrite the code and use something like curl? Or are there other options?


Solution

  • The only answer is to use CURL. The answer of J Griffiths: https://stackoverflow.com/a/19497103/1738274 gives you an idea how to fix this.