По совету 'AlexP11223' и погуглив, накидал такой код.
Чувствую, что он далеко не идеален, но все работает.
Замечания принимаются.)
libxml_use_internal_errors(true);
$dom = new DomDocument;
$dom->loadHTMLFile("http://calendar.zoznam.sk/sunset-pl.php?city=3080866");
$xpath = new DomXPath($dom);
$today = $xpath->query("//td[@class='today']");
$nodes1 = $xpath->query("//td[@class='today']/following::td[1]");
$nodes2 = $xpath->query("//td[@class='today']/following::td[2]");
$nodes3 = $xpath->query("//td[@class='today']/following::td[3]");
$nodes4 = $xpath->query("//td[@class='today']/following::td[4]");
header("Content-type: text/plain");
foreach ($today as $i => $node) {
echo $node->nodeValue, "\n";
}
foreach ($nodes1 as $i => $node1) {
echo $node1->nodeValue, "\n";
}
foreach ($nodes2 as $i => $node2) {
echo $node2->nodeValue, "\n";
}
foreach ($nodes3 as $i => $node3) {
echo $node3->nodeValue, "\n";
}
foreach ($nodes4 as $i => $node4) {
echo $node4->nodeValue, "\n";
}
+ Если с evaluate, то будет примерно так:
$today = $xpath->evaluate('string(//td[@class="today"])');
$first = $xpath->evaluate('string(//td[@class="today"]/following::td[1])');
$second = $xpath->evaluate('string(//td[@class="today"]/following::td[2])');
$third = $xpath->evaluate('string(//td[@class="today"]/following::td[3])');
$fourth = $xpath->evaluate('string(//td[@class="today"]/following::td[4])');
echo $today."<br>",
$first."<br>",
$second."<br>",
$third."<br>",
$fourth;