php5 get http response body using curl library

get response body of specified web page using php5, such as google homepage.

ob_start();
$ch = curl_init("http://www.google.com/");
curl_exec($ch);
curl_close($ch);
$retrievedhtml = ob_get_contents();
ob_end_clean();
echo $retrievedhtml;
?>