HTTP request failed! HTTP/1.1 505 HTTP Version Not Supported error

Posted by shyam on Stack Overflow See other posts from Stack Overflow or by shyam
Published on 2010-05-03T10:33:20Z Indexed on 2010/05/03 10:38 UTC
Read the original article Hit count: 395

Filed under:
|
|

I'm trying to use file_get_contentsO() to get the response from a server and this error was encountered. Could someone tell me what is the reason and how to fix it? The portion of the code is:

$api = "http://smpp5.routesms.com:8080/bulksms/sendsms?username=$username&password=$password&source=$source&destination=$destin&dlr=$dlr&type=$type&message=$message";
$resp = file_get_contents($api);

The server responded correctly while I pasted the url in the browser. I learned that this is caused by the server rejecting the client's HTTP version, but I have no idea why that is happening in my case.

Any help is much appreciated. Thanks in advance

© Stack Overflow or respective owner

Related posts about http

Related posts about php