title: PHP cURL send bool POST variable
body: <p>I'm having PHP curl script that send some POST variables to CloudFlare API:
  My fields are:</p>
  
  <pre><code>    $fields = array(
          'type' =&gt; 'A',
          'name' =&gt; $subdomain.rand(1, 2000),
          'content' =&gt; Env::getCFIP(),
          'proxied' =&gt; true,
          'ttl' =&gt; 1
      );
  </code></pre>
  
  <p>And the curl <strong>curl_setopt</strong> are:</p>
  
  <pre><code>        array(
              CURLOPT_POST            =&gt; true,
              CURLOPT_SSL_VERIFYPEER  =&gt; false,
              CURLOPT_POSTFIELDS      =&gt; $fields,
              CURLOPT_RETURNTRANSFER  =&gt; 1,
              CURLOPT_TIMEOUT         =&gt; 3,
              CURLOPT_VERBOSE         =&gt; 0,
              CURLOPT_FORBID_REUSE    =&gt; true,
              CURLOPT_HTTPHEADER      =&gt; array(
                  'X-Auth-Email: '.Env::getCFEmail(),
                  'X-Auth-Key: '.Env::getCFAuthKey(),
              )
          );
  </code></pre>
  
  <p>Default is value of <strong>'proxied'</strong> is false. If I skip it in data fields, scripts works. However, I want to have it on true, but I get error:</p>
  
  <pre><code>    object(stdClass)[2]
        public 'success' =&gt; boolean false
        public 'errors' =&gt; 
          array (size=1)
            0 =&gt; 
              object(stdClass)[8]
                public 'code' =&gt; int 1004
                public 'message' =&gt; string 'DNS Validation Error' (length=20)
                public 'error_chain' =&gt; 
                  array (size=1)
                    0 =&gt; 
                      object(stdClass)[7]
                         public 'code' =&gt; int 9003
                         public 'message' =&gt; string 'Invalid 'proxied' value, must be a boolean' (length=42)
        public 'messages' =&gt; 
          array (size=0)
            empty
        public 'result' =&gt; null
  </code></pre>
  
  <p>So my guess is that when cURL send POST request it converts data variables to STRING. Is there any way to stop this behavior?</p>