我正在尝试使用file_get_contents()来从服务器获取响应并遇到此错误.有人能告诉我是什么原因以及如何解决它?代码的一部分是:
$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);
Run Code Online (Sandbox Code Playgroud)
当我在浏览器中粘贴网址时,服务器响应正确.我了解到这是由服务器拒绝客户端的HTTP版本引起的,但我不知道为什么会发生这种情况.
任何帮助深表感谢.提前致谢