I'm trying the following:
$url = 'https://www.tripadvisor.es/Hotels-g187514-Madrid-Hotels.html'
$ta_html = file_get_html($url);
var_dump($ta_html);
it returns false, this is working and correctly getting the html for:
$url = 'https://www.tripadvisor.es/Hotels-g294316-Lima_Lima_Region-Hotels.html#ACCOM_OVERVIEW'
My first thought was that it had a redirect but I checked the headers with curl and its 200 ok and it seemed like the same on both cases. What can be happening? how it can be solved?
This seems to be a duplicate of this problem: Simple HTML DOM returning false that is also unanswered
DOMDocument
php built-in class. – Bisitun