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