简体   繁体   中英

Is PHP curl to HTTPS secure?

I read these two things:

  • Sending data from HTTP to HTTPS is not safe.
  • Curl is as secure as a normal HTTP request.

Putting these together, would sending a password to an HTTPS server through curl be insecure? Do both servers need HTTPS in order to be secure?

Using curl in php is safe as long as you don't disabled the certificate verification .

Do not touch CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER, their default values are the secure ones.

https://secure.php.net/manual/fr/function.curl-setopt.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM