title: PHP cURL and ob
body: <p>Someone had asked me to help him with cURL today, and as a result I looked up the function that I written a while ago. I was wondering why I used the ob functions. I probably followed some tutorial at the time; however, when I look at most cURL classes now they don't use the ob functions... I suppose the question is, what is better performance wise? Is there anything wrong with the code below? and Is there a better way to do this?</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt ($ch, CURLOPT_URL, $url);
  curl_setopt ($ch, CURLOPT_HEADER, 0);
  ob_start();
  curl_exec ($ch);
  curl_close ($ch);
  $string = ob_get_contents();
  ob_end_clean();
  return $string;
  </code></pre>