20) ){ $fcontents = join ('', @file ('http://www.heise.de/autos/rss/news.rdf')); @unlink($CACHE_FILE); $handle = @fopen($CACHE_FILE, 'x+'); @fwrite($handle, $fcontents); @fclose($handle); } $fcontents = join ('', @file ($CACHE_FILE)); } else { $fcontents = join ('', @file ('http://www.heise.de/autos/rss/news.rdf')); } $fcontents = str_replace ("", "", $fcontents); $fcontents = str_replace ("", "", $fcontents); $splices = explode ("", $fcontents); if (count($splices) > $MAX_NEWS){ $stop_at = $MAX_NEWS; } else { $stop_at = count($splices); } $out_buffer = ''; for ($i = 1; $i < $stop_at; $i++){ $link = explode("",$splices[$i]); $splices1[$i] = $splices[$i]; $splices1[$i] = strip_tags($splices1[$i]); $splices1 = explode(" ",$splices1[$i]); //$splices1[$i] = substr($splices1[$i], -45, (len($splices1[$i])-45)); $splices[$i] = substr ($splices[$i], 0, 100); $link[1] = strip_tags($link[1]); $headline = str_replace ("", '<tr><td valign="middle"><li></td><td valign="middle" title="' . trim($splices1[1]) . '" ><a href="' . trim($link[1]) . '" target="_blank" style="text-decoration: none"> <font face="Verdana" size="2" >', $splices[$i]); $headline = str_replace ("", "", $headline); $headline = explode ("", $headline); $headline = $headline[0]; $out_buffer = $out_buffer . $headline . '
'; } $out_buffer = $out_buffer . "
"; print $out_buffer; ?>