dolibarr/htdocs/includes/stripe/stripe-php/update_certs.php

20 lines
383 B
PHP
Raw Normal View History

2018-03-06 13:50:42 +01:00
#!/usr/bin/env php
<?php
2021-01-03 23:37:44 +01:00
\chdir(__DIR__);
2018-03-06 13:50:42 +01:00
2021-01-03 23:37:44 +01:00
\set_time_limit(0); // unlimited max execution time
2018-03-06 13:50:42 +01:00
2021-01-03 23:37:44 +01:00
$fp = \fopen(__DIR__ . '/data/ca-certificates.crt', 'w+b');
2018-03-06 13:50:42 +01:00
2021-01-03 23:37:44 +01:00
$options = [
2022-01-03 12:28:42 +01:00
\CURLOPT_FILE => $fp,
\CURLOPT_TIMEOUT => 3600,
\CURLOPT_URL => 'https://curl.haxx.se/ca/cacert.pem',
2021-01-03 23:37:44 +01:00
];
2018-03-06 13:50:42 +01:00
2021-01-03 23:37:44 +01:00
$ch = \curl_init();
\curl_setopt_array($ch, $options);
\curl_exec($ch);
\curl_close($ch);
\fclose($fp);