- fopen("http://google.com", "r") works fine
- fopen("http://localhost/test.txt", "r") doesn't work - error "failed to open stream"
- in php.ini: allow_url_fopen = On
- Windows Vista, WAMP Server, PHP 5.2.5
Solution:
- use 127.0.0.1 instead of localhost
- fopen("http://127.0.0.1/test.txt", "r") works fine
Keywords:
- SoapClient, SoapServer, "Could not connect to host", remote file, unable to open http request stream with fopen, fsockopen, http request filed, warning