How to get file_get_contents() to work with HTTPS?

后端 未结 12 1983
长发绾君心
长发绾君心 2020-11-21 23:38

I\'m working on setting up credit card processing and needed to use a workaround for CURL. The following code worked fine when I was using the test server (which wasn\'t cal

12条回答
  •  忘掉有多难
    2020-11-22 00:18

    Sometimes a server will choose not to respond based on what it sees or doesn't see in the http request headers (such as an appropriate user agent). If you can connect with a browser, grab the headers it sends and mimic them in your stream context.

提交回复
热议问题