Sì, le CURL sono abilitate (se hai le connessioni server2server attive.
Prova con un codice minimale come:
Codice PHP:
<?php
if(isset($_POST['url']))
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $_POST['url']);
curl_setopt($ch,CURLOPT_POST, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
curl_close($ch);
file_put_contents('./pagina.txt',$output);
header('location: ./pagina.txt');
}
else
echo '
<!doctype html>
<head>
<title>pagina</title>
</head>
<body>
<form method="post" action="">
Url: <input type="text" name="url">
<input type="submit" value="Cerca!">
</form>
</body>
</html>';
?>
Ciao!