我尝试使用PHP中的file_get_contents()使用API发送SMS。PHP file_get_contents()问题
例如,
file_get_contents("http://testsmssite/SMS.php?username=xx&password=ccc&message=MESSAGE&numbers=1111111111&sender=11111");
在本地机器上运行良好。
如果我把它放到服务器[SERVER A]它不工作。如果我更改代码 即。 file_get_contents("http://google.com");
它在服务器和本地都可以正常工作。
,如果我把这个页面即
file_get_contents("http://testsmssite/SMS.php?username=xx&password=ccc&message=MESSAGE&numbers=1111111111&sender=11111");
到其他服务器[SERVER B]它工作正常。
如果它与我的[SERVER A]有任何问题,那么它如何打开谷歌?
任何人都可以帮我解决这个问题吗?
不知道,但也许您的托管服务器配置为阻止对某些网站的请求。 –
http获取请求...所以暴露用户名和密码不是问题? – colithium
服务器A上有错误吗? –