I recently upgraded on to MacOsx mojave then, suddenly php script not working anymore. if I use real urls, but if I use localhost it works.
$homepage = file_get_contents('http://www.example.com/');
results in
This page isn’t working mysite.localhost didn’t send any data. ERR_EMPTY_RESPONSE
Works:
$homepage = file_get_contents('http://localhost/');
Tests: Chrome,Firefox,Safari
XAMPP PHP5.6.33 OSX: Mojave