#'; $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('', '', $td)); if(!empty($td)) $tr[$i][] = trim(preg_replace('##msU', '', $td)); } } unset($tr[0]); unset($tr[1]); foreach($tr as $i => $cols) { if((count($cols) == 5) && ($i>1)) { $title_match = '#'; $r[] = "\t".$arr['time'].''; $r[] = "\t".$arr['link'].''; $r[] = "\t'; $r[] = "\t".$arr['link'].''; $r[] = ""; $rss[] = implode(PHP_EOL."\t", $r); } $rss[] = ''.PHP_EOL.''; header('Content-Type: text/xml; charset=UTF-8'); echo implode(PHP_EOL, $rss); } else { echo 'No website fetched'; } ?>