PHP:
<?php
$curl = curl_init();
$url = 'https://www.tff.org/default.aspx?pageID=198';
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$html = curl_exec($curl);
curl_close($curl);
$dom = new DOMDocument();
libxml_use_internal_errors(true);
$dom->loadHTML($html);
libxml_clear_errors();
$xpath = new DOMXPath($dom);
$table = $xpath->query('//table[contains(@class, "s-table")]')->item(0);
if ($table) {
$rows = $table->getElementsByTagName('tr');
$headerRow = $rows->item(0);
$headers = $headerRow->getElementsByTagName('span');
$columnCount = $headers->length;
echo "<style>";
echo "table { border-collapse: collapse; width: 100%; max-width: 800px; margin: 0 auto; font-family: Arial, sans-serif; }";
echo "th, td { padding: 8px; text-align: left; border-bottom: 1px solid #ddd; }";
echo "th { background-color: #f2f2f2; }";
echo "tr:hover { background-color: #f5f5f5; }";
echo "th:last-child, td:last-child { text-align: right; }";
echo "</style>";
echo "<table>";
echo "<tr>";
echo "<th></th>";
for ($i = 0; $i < $columnCount; $i++) {
echo "<th>" . $headers->item($i)->nodeValue . "</th>";
}
echo "</tr>";
for ($i = 1; $i < $rows->length; $i++) {
echo "<tr>";
$cells = $rows->item($i)->getElementsByTagName('td');
$titleCell = $cells->item(0);
echo "<td>" . $titleCell->nodeValue . "</td>";
for ($j = 1; $j < $columnCount; $j++) {
echo "<td>" . $cells->item($j)->nodeValue . "</td>";
}
$pointsCell = $cells->item($columnCount - 1);
echo "<td>" . $pointsCell->nodeValue . "</td>";
echo "</tr>";
}
echo "</table>";
} else {
echo "Tablo bulunamadı!";
}
?>