Answer the question
In order to leave comments, you need to log in
Why is a blank page returned when parsing a page?
there is a php code that parses 2 pages:
$url1 = 'http://www.championat.com/football/_england/773/calendar/date.html';
$url2 = 'http://www.championat.com/football/_england/1042/calendar/tour.html';
//Вернет пустую страницу
echo HtmlDomParser::file_get_html($url1);
//Вернет уже страницу с контентом
echo HtmlDomParser::file_get_html($url2);
$contents = file_get_contents($url, $use_include_path, $context, $offset);
if (empty($contents) || strlen($contents) > MAX_FILE_SIZE)
{
return false;
}
Answer the question
In order to leave comments, you need to log in
try
writing instead
$dom = HtmlDomParser::file_get_html($url1);
var_dump($dom);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question