update_certs.php 407 B

12345678910111213141516171819
  1. #!/usr/bin/env php
  2. <?php
  3. chdir(dirname(__FILE__));
  4. set_time_limit(0); // unlimited max execution time
  5. $fp = fopen(dirname(__FILE__) . '/data/ca-certificates.crt', 'w+');
  6. $options = array(
  7. CURLOPT_FILE => $fp,
  8. CURLOPT_TIMEOUT => 3600,
  9. CURLOPT_URL => 'https://curl.haxx.se/ca/cacert.pem',
  10. );
  11. $ch = curl_init();
  12. curl_setopt_array($ch, $options);
  13. curl_exec($ch);
  14. curl_close($ch);
  15. fclose($fp);