title: How to convert Php CURL request to command line curl
body: <p>How to translate following php curl request to curl executable command.</p>
  
  <pre><code> $curlOpts = array(
                      CURLOPT_PORT           =&gt; "3000",
                      CURLOPT_URL            =&gt; 'www.example.com',
                      CURLOPT_RETURNTRANSFER =&gt; true,
                      CURLOPT_HTTPHEADER     =&gt; array("Cookie: connect.sid=aASD234SDFfds", "content-type:application/json"),
                      CURLOPT_POST           =&gt; true,
                      CURLOPT_POSTFIELDS     =&gt; {"email": "test.com",  
     "password": "123456"},
                  );
  
  curl_setopt_array($ch, $curlOpts);
   $output = curl_exec($ch);
  </code></pre>
  
  <p>Respected Curl command which I want</p>
  
  <pre><code>curl -X GET --header 'Accept: application/json' 'http://www.example.com?sort=clicks&amp;order=des'
  
  
  curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ 
     "email": "test.com", \ 
     "password": "123456" \ 
   }' 'http://example.com/login'
  </code></pre>
  
  <p>Please help me for the same.</p>