I tested this script on another server and it worked fine. Do I have to set my php.ini file? And how?
<开发者_StackOverflow中文版?php
ini_set('allow_url_fopen', 1);
if (!isset($_GET['url'])) {
exit();
}
echo file_get_contents($_GET['url']);
?>
From the PHP Manual on allow_url_fopen
Note: This setting can only be set in php.ini due to security reasons.
Open the PHP.ini file with an editor and change the setting accordingly. If this on shared hosting and you do not have access to the PHP.ini contact your hosting service and ask them if they could change the setting.
精彩评论