Sorry, my question was not clear.
I would like to know the code below is secure or not.
Code:
function get_content($url) {
$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;
}
$content = get_content ("http://yoursite.com/wordpress/?page_id=3");
echo ($content);