title: cURL post not working PHP
body: <p>I'm having trouble using cURL for a specific page.</p>
  
  <p>A live code working: <a href="http://svgen.com/jupiter.php" rel="noreferrer">http://svgen.com/jupiter.php</a></p>
  
  <p>Here is my code:</p>
  
  <pre><code>    $url = 'https://uspdigital.usp.br/jupiterweb/autenticar';
  
      $data = array('codpes' =&gt; 'someLogin', 'senusu' =&gt; 'somePass', 'Submit' =&gt; '1');
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_COOKIEJAR, "FileHere");
      curl_setopt($ch, CURLOPT_COOKIEFILE, "FileHere");
      curl_setopt($ch, CURLOPT_POST, 1);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
      curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP);
      curl_exec($ch);
      curl_close($ch);
  </code></pre>
  
  <p>Although I had used the same url and post data, file_get_contents worked:</p>
  
  <pre><code>    $options = array('http' =&gt; array('method'  =&gt; 'POST','content' =&gt; http_build_query($data)));
      $context  = stream_context_create($options);
      $result = file_get_contents($url, false, $context);
  
      var_dump($result); 
  </code></pre>
  
  <p>Someone could help me?
  Thanks.</p>