title: SSL certificate error using Twitter API
body: <p>I'm developing locally on a Windows IIS server and trying to use the Twitter API in my application, like this:</p>
  
  <pre><code>$settings = array(
    'oauth_access_token' =&gt; "...",
    'oauth_access_token_secret' =&gt; "...",
    'consumer_key' =&gt; "...",
    'consumer_secret' =&gt; "..."
  );
  
  $twitter = new TwitterAPIExchange($settings);
  
  $url = "https://api.twitter.com/1.1/search/tweets.json";
  $getfield = "?q=%23test";
  $requestMethod = "GET";
  $result = $twitter-&gt;setGetfield($getfield)-&gt;buildOauth($url, $requestMethod)-&gt;performRequest();
  
  echo json_encode($result);
  </code></pre>
  
  <p>Running this gives me the following error:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught Exception: SSL certificate problem: unable to get local issuer certificate in C:\inetpub\wwwroot\...\vendor\j7mbo\twitter-api-php\TwitterAPIExchange.php on line 321
    Exception: SSL certificate problem: unable to get local issuer certificate in C:\inetpub\wwwroot\...\vendor\j7mbo\twitter-api-php\TwitterAPIExchange.php on line 321</p>
  </blockquote>
  
  <p>I have found out that you need to add a <a href="https://curl.haxx.se/docs/caextract.html" rel="nofollow noreferrer">SSL certificate</a>, I've downloaded the cacert.pem but I'm lost on how to enable it in IIS. Any pointers?</p>
  
  <p>Edit: So I have now imported a certificate from our company in IIS, my server is now running on https. I added this to my <code>php.ini</code>:</p>
  
  <pre><code>curl.cainfo = "C:\...\certificate.PFX"
  </code></pre>
  
  <p>But after restarting the server I'm still getting the same error.</p>