Using cURL, I'm trying to get the page content, an example of the page https://mt4trendindicator.com

My site works without ssl over http protocol, as a result I get an error ERR_CONNECTION_REFUSED and the protocol of my site changes to https protocol, although ssl is not installed.

Added lines to code

 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 

but nothing has changed.

What could be the problem, why does the page open via https protocol?

ps most url open correctly except the above.

https://yandex.ru easily opens on my http-based protocol without installing ssl.

  • You attach the link to the site with https and write that it works over http. - Boris Ustyantsev
  • Other https sites work easily on the http site. There are still sites that open up just a white page, I have been working with curl for a long time, but I haven’t encountered similar problems :( - MicroRu 4:04 pm
  • one
    From your question it is difficult to understand what your site is about. - Boris Ustyantsev
  • one
    If I understand correctly, do you open in the browser a page that leads to PHP on your site, which curl requests another site, the result of the request for which is returned to the browser? If so, then there may just be a redirect to https. Try for curl to play around with (CURLOPT_FOLLOWLOCATION, FALSE) - Boris Ustyantsev
  • one
    @andreymal agree, but this is a redirect, the tag that you say html , while not fulfilled. - Farkhod Daniyarov

0