doqs8936 2013-10-02 16:47
浏览 28
已采纳

来自Raw Post Stream的PHP标头

I am trying to access the X-Shopify-* headers from this raw post request in php:

http://requestb.in/txqnuftx?inspect

I don't have the http and apache extensions installed.

I've tried headers_list() but they are not listed.

What else can I try? Could it be something I need to enable in php.ini or .htaccess?

My host is Go Daddy.

  • 写回答

1条回答 默认 最新

  • dongzhukuai8177 2013-10-02 16:55
    关注

    You're looking for getallheaders() or http_get_request_headers() only available from the extensions you don't currently have installed.

    It does appear that some headers are automatically added to the $_SERVER variable with "HTTP_" in front of them, so I would dump that array and check there first. You'll find underscores instead of hyphens. On one of my setups a proxy server's injected "X-" header is showing up in there.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀