update_certs.php 383 B

12345678910111213141516171819
  1. #!/usr/bin/env php
  2. <?php
  3. \chdir(__DIR__);
  4. \set_time_limit(0); // unlimited max execution time
  5. $fp = \fopen(__DIR__ . '/data/ca-certificates.crt', 'w+b');
  6. $options = [
  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);