title: Send Curl POST with string
body: <p>I'm trying to make a Curl request to an EndPoint. This request has a param which a string text. The function at the Endpoint only return the same string. The issue is that the Endpoint's function only return the first word of the String.</p>
  
  <p>Here is the code I use:</p>
  
  <pre><code>$params = $_SESSION['search'].'/'.$_SESSION['page'];
  $curl   = curl_init();
  curl_setopt_array($curl, array(
      CURLOPT_RETURNTRANSFER  =&gt; true,
      CURLOPT_USERAGENT       =&gt; 'Stlfinder',
      CURLOPT_POST            =&gt; false,
      CURLOPT_URL             =&gt; "mydomain.com/api/search/$params"
  ));
  $resultados = curl_exec($curl);
  curl_close($curl);
  $resultados   = json_decode($resultados);
  print_r($resultados);
  </code></pre>
  
  <p>This is what I get:</p>
  
  <pre><code>stdClass Object ( [result] =&gt; The )
  </code></pre>
  
  <p>and the String sent is: 'The mansion book'</p>
  
  <p>Is there anything missing in the Curl?</p>