php - CURL doesn't return transfer

one text

  • List item

I am trying to read eldorado web page using CURL:

$curl = curl_init();
        $url = "https://eldorado.ua/smartfon-samsung-galaxy-a52-8256-gb-black-sm-a525-fzkisek-/p71321565/";
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($curl, CURLOPT_AUTOREFERER, false);
        curl_setopt($curl, CURLOPT_VERBOSE, 1);
        curl_setopt($curl, CURLOPT_HEADER, 1);

        curl_setopt(
                $curl,
                CURLOPT_USERAGENT,
                'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16'
                //'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
        );

        curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies);
        curl_setopt($ch, CURLOPT_COOKIEFILE, $cookies);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        $content = curl_exec($curl);
        var_dump(curl_error($curl));
        curl_close($curl);

$content variable has the following contents:

HTTP/1.1 200 OK
Content-Type: text/html
Cache-Control: no-cache, no-store
Connection: close
Content-Length: 829
X-Iinfo: 13-324630841-0 0NNN RT(1638095614075 65) q(0 -1 -1 -1) r(0 -1) B12(4,316,0) U18
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
Set-Cookie: visid_incap_1842303=FMRet2iZRrGNOuu82l7DO/5ao2EAAAAAQUIPAAAAAABVozZ0i7WNRFUDf/QdYAjO; expires=Sun, 27 Nov 2022 10:37:38 GMT; HttpOnly; path=/; Domain=.eldorado.ua; Secure; SameSite=None
Set-Cookie: incap_ses_1339_1842303=OdttRK2/JxoEdGTA1xWVEv5ao2EAAAAAdzZ8EVHb34MWILP16s8cnA==; path=/; Domain=.eldorado.ua; Secure; SameSite=None
 
<html style="height:100%"><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"><meta name="format-detection" content="telephone=no"><meta name="viewport" content="initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"></head><body style="margin:0px;height:100%"><iframe id="main-iframe" src="/_Incapsula_Resource?SWUDNSAI=31&xinfo=13-324630841-0%200NNN%20RT%281638095614075%2065%29%20q%280%20-1%20-1%20-1%29%20r%280%20-1%29%20B12%284%2c316%2c0%29%20U18&incident_id=1339000480602535690-1335785097440988173&edet=12&cinfo=04000000&rpinfo=0&cts=pUCYtu4azOH0BoWedolrRwNhF%2fJP8SALxZ2aJzTHaLfVGw1YqkWG3zJRlnNPQgew&mth=GET" frameborder=0 width="100%" height="100%" marginheight="0px" marginwidth="0px">Request unsuccessful. Incapsula incident ID: 1339000480602535690-1335785097440988173</iframe></body></html>

Html body contains only iframe tag, which could not be properly displayed. Does anybody know how to get the whole html body contents?

Source