I\'m trying to use file_get_contents()
to get the response from a server and this error was encountered. Could someone tell me what is the reason and how to fix
Can you sniff what's happening on the wire? Seeing the format of the HTTP request as it goes out on the wire would help a lot.
Without seeing that, my best guess would be that the server isn't well-implemented, and is rejecting a HTTP/1.1 request. Try setting --http1.0
on Curl and seeing what happens...