PHP 5.4 - file_get_contents not working when requesting urls on same server

Clash Royale CLAN TAG#URR8PPPPHP 5.4 - file_get_contents not working when requesting urls on same server
I'm unable to get content from same server domain for example the following returns empty:
file_get_contents('http://www.myexamplesite.com')
If I have file_get_contents('http://google.com') or any other external url it seems to work fine.
file_get_contents('http://google.com')
php.ini has allow_url_fopen = on
allow_url_fopen = on
Already looked at the following post file_get_contents() not working to same server but OP hasn't provided a solution.
Any ideas - I'm suspecting it's an ip resolution problem?
@Utkanos tried curl and that doesn't work for url's on same server but works for external urls
– adam78
15 mins ago
Turned on error reporting/display? Nothing in the error logs? Does your browser console show any errors?
– kerbholz
7 mins ago
1 Answer
1
You need to also check in PHP.ini file
extension = php_openssl.dll
and check your firewall fules.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Perhaps try cURL?
– Utkanos
23 mins ago