#';
$table = 4;
} else {
$body_split = "#
\n#";
$table = 1;
}
if($html = curl_get_contents($url)) {
$body_end = preg_split($body_split, $html, 2);
$body_only = preg_split('#
#', $body_end[1], 2);
$tables = explode('', $body_only[0]);
$showtable = $tables[$table];
$rows = explode('', $showtable);
foreach($rows as $i => $row) {
$tds = explode('', $row);
foreach($tds as $td) {
$td = trim(str_replace('