php - 对外部站点的 file_get_contents 请求

标签 php json apache http file-get-contents

我正在尝试对此 Demo URL 执行 file_get_contents
但是服务器无法从外部站点获取数据。这是我回显 file_get_contents 时得到的错误:

Found The document has moved here. Apache/2.4 Server at spotifycharts.com Port 80

我已经在 php.ini 文件 中打开了 register_global,但这没有帮助。

为了确保我的网站能够从外部网站获取数据,最合乎逻辑的检查是什么?

最佳答案

关于php - 对外部站点的 file_get_contents 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34397107/

相关文章:

php - 类内准备好的语句不起作用

php - ZF2维护页面

javascript - 将相关对象连接到一个对象数组中? (javascript)

android - json解析使用gson获取位置

html - 在 Apache JMeter 中不记录 html 样本

java - 从 AJP 连接器请求中检索 Shibboleth 属性

php - 插入值的意外错误和 implode() 的错误

PHP 脚本未定义属性和无效参数错误

python - 使用 python 将文件读取为 json 的替代方法

apache - openssl 无法获取本地颁发者证书 debian