Tietosuojasyistä serverillä ei ole allow_url_fopen, eivätkä laita, mutta sain seuraavan neuvon:
Instead of:
$file_contents = file_get_contents('
example.com/
');
// display file
echo $file_contents;
?>
Use this:
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, '
example.com
');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
// display file
echo $file_contents;
?>
eli mistä tuo muokattava koodi löytyy vai pitääkö vääntää joku php.ini?
Kiitoksia vastauksista etukäteen