Following code returns the curl output as a string.<?php
// create curl ressource$ch= curl_init();
// set urlcurl_setopt($ch, CURLOPT_URL, "example.com");//return the transfer as a stringcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);// $output contains the output string$output= curl_exec($ch);// close curl ressource to free up system ressourcescurl_close($ch);
?>