title: cURL code in PHP dumps output to the page
body: <p>How do I hide the output from curl in PHP?</p>
  <p>My code as it stands is the following:</p>
  <pre class="lang-php prettyprint-override"><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_USERPWD, $pass);
  $result = curl_exec($ch);
  curl_close ($ch);
  </code></pre>
  <p>The problem is that is spews out the entire page to the user. Instead I want to capture the output and simply show a &quot;success&quot; or &quot;failed&quot; message?</p>