E
E
Elizabeth Lawrence2020-02-28 22:20:39
PHP
Elizabeth Lawrence, 2020-02-28 22:20:39

How to fix file_get_contents giving HTTP request failed! HTTP/1.1 426 Upgrade Required?

Good evening!
When trying to get the content of the page using the construct:

file_get_contents($url, null, stream_context_create(['https' => ['method' => 'GET']]));

I get an HTTP request failed! HTTP/1.1 426 Upgrade Required. I understand that the server requires to be contacted through some other protocol, but how to set the protocol in the file_get_contents function?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Shamanov, 2020-02-28
@SilenceOfWinter

List of HTTP Status Codes

L
Lazy @BojackHorseman PHP, 2020-02-28
Tag

to fasten openssl to puff newer?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question