Guest User

ssl.php

a guest
Feb 23rd, 2015
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. header('Content-Type: text/plain');
  4.  
  5. $url = 'https://extensions.bolt.cm/list.json';
  6.  
  7. $ch = curl_init();
  8. $timeout = 100;
  9. curl_setopt($ch, CURLOPT_VERBOSE, 1);
  10. curl_setopt($ch, CURLOPT_STDERR, fopen(dirname(__FILE__) . '/curlerror.txt', 'w+'));
  11. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
  12. curl_setopt($ch, CURLOPT_URL, $url);
  13. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  14. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  15. $data = curl_exec($ch);
  16. $error = curl_error($ch);
  17. curl_close($ch);
  18.  
  19. var_dump($data);
  20. var_dump($error);
  21. var_dump(ini_get('curl.cainfo'));
Advertisement
Add Comment
Please, Sign In to add comment