I am using php-5.6.30 and Apache 2.2.15 on Centos. I am using this code:
$uri = trim(urldecode($_REQUEST['uri']));
$validate_content = @file_get_contents($uri);
echo $validate_content;
I am accessing it like : http://10.20.30.40:8001/index.html?uri="URL HERE" Whenever I am using URL like http://www.example.com then it is working fine. But whenever I use URL like http://127.0.0.1:8000/App/app.html or http://10.10.10.40:9000/App/app.html it is returning bool(false).
When I am running the same code(above code) on Windows WampServer(Apache 2.4.18 - PHP 5.6.19 - MySQL 5.7.11) and accessing it . It is working fine. But when I am using the same code with Centos(Apache 2.2.15, php-5.6.17-3(cli) it is not working .