title: Convert cURL Command Line to cURL PHP with URL Encoded
body: <p>I am trying to convert a command line API to PHP cURL</p>
  
  <p>Here's command line php curl</p>
  
  <pre><code>curl --data-urlencode "type=5" --data-urlencode "url=https://example.com/test.torrent" --data-urlencode "comment=API test" --data-urlencode "website=https://example.com/" --data-urlencode "apikey=123456-asdfasdfasdfasdfasdfasdf" --data-urlencode "send=true" https://www.source-site.com/get.php
  </code></pre>
  
  <p>This is what I am trying with PHP</p>
  
  <pre><code>&lt;?php
  ini_set('display_errors',1);
  $arr=array(
      'type' =&gt; 'category5',
      'url' =&gt; 'https://example.com/test.torrent',
      'website' =&gt; 'https://example.com',
      'apikey' =&gt; '696c1a998ac8f13154-088605f-9b0',
      'send' =&gt; 'true'
   );
  $data_string = http_build_query($arr);
  $ch = curl_init('https://www.source-site.com/get.php'); // this url where my file will be uploaded                                                                     
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);                                                                  
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                                                                                                                                         
  curl_exec($ch);
  echo curl_error($ch);
  ?&gt;
  </code></pre>
  
  <p>Now the problem is, it does not upload the file nor display any errors the page is blank, what's wrong with my PHP codes?</p>
  
  <p>I have updated my codes now I get the following error</p>
  
  <pre><code>error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
  </code></pre>