Answer the question
In order to leave comments, you need to log in
How to parse an https site using a proxy?
For parsing, the Snoopy library is used, which uses stream_socket_client () for the connection.
It copes with the task except for one site that palms off a secure connection, when using a proxy, it is impossible to parse a site with such a connection, is there a way to access the site using a non-secure protocol?
Banal prescribing in the address http instead of https does not help.
If you ignore the error that the site uses https, then as a result I will get the page
301 Moved Permanently
nginx
[response_code] => HTTP/1.1 301 Moved Permanently
[headers] => Array
(
[0] => HTTP/1.1 301 Moved Permanently
[1] => Server: nginx
[2] => Date: Wed, 19 Jul 2017 22:13:10 GMT
[3] => Content-Type: text/html
[4] => Content-Length: 178
[5] => Location: https://pdalife.ru/
[6] => X-Cache: MISS from Kluay03
[7] => X-Cache-Lookup: MISS from Kluay03:8888
[8] => Via: 1.1 Kluay03 (squid/3.3.8)
[9] => Connection: close
)
trigger_error("HTTPS connections over proxy are currently not supported", E_USER_ERROR)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question