- file_get_contents: documentation ( source)
<?php
$html = "http://www.margonem.pl/?task=clanrank&w=infinity";
$xml = new DOMDocument();
$xml->validateOnParse = true;
$xml->loadHTML(file_get_contents($html));
$xpath = new DOMXPath($xml);
$table =$xpath->query("//*[@id='ranking']")->item(0);
$rows = $table->getElementsByTagName("tr");
foreach ($rows as $row) {
$cells = $row -> getElementsByTagName('td');
foreach ($cells as $cell) {
print $cell->nodeValue;
}
}