|
[ Autoren gesucht! ]
|
PHP-Homepage.de sucht laufend Autoren für News und Artikel
Interesse?
|
|
 |
|
[Start] [Suche] [Neue Einträge]
| Backend für die News von Golem.de | <?php
$link_prefix1 = " o <a";
$link_postfix1 = "<BR>\n";
$cache_file1 = "tmp/gnn.cache";
$cache_time1 = 3600;
$items1 = 0;
$time1 = split( " ", microtime());
srand((double)microtime()*1000000);
$cache_time_rnd1 = 300 - rand(0, 600);
if ((!(file_exists($cache_file1))) || ((filectime($cache_file1) + $cache_time1 - $time1[1]) + $cache_time_rnd1 < 0) || (!(filesize($cache_file1))) ) {
$fp1=fopen("http://www.golem.de/", "r");
$string1=fread($fp1, 200000);
eregi("Letzte Meldungen(.*)<HR size=1 align=center width=80%>", $string1, $matches1);
$match1=str_replace("<table width=\"190\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">","",$matches1[1]);
$match1=str_replace("</table>","",$match1);
$match1=str_replace("</tr>","",$match1);
$match1=str_replace("<tr>","",$match1);
$match1=str_replace("<td width=\"8\">","",$match1);
$match1=str_replace("</td>","",$match1);
$match1=str_replace("<font face=\"Verdana, Arial\" size=\"1\">","",$match1);
$match1=str_replace("<br>","",$match1);
$match1=str_replace("<B>","",$match1);
$match1=str_replace("</B>","",$match1);
$match1=str_replace("<td>","",$match1);
$match1=str_replace("<BR>","",$match1);
$match1=str_replace(" ","",$match1);
$match1=str_replace("<FONT face=\"Verdana,Arial,Helvetica\" size=\"1\">","",$match1);
$match1=str_replace("</a>","</a><br>",$match1);
$match1=str_replace("href=\"/","href=\"http://www.golem.de/",$match1);
$match1=str_replace("<a","$link_prefix1",$match1);
$match1=str_replace("</font>","",$match1);
$match1=str_replace("<","<",$match1);
$match1=str_replace("<font face=\"Verdana,Arial,Helvetica\" size=\"1\">","",$match1);
$match1 = trim($match1);
fclose($fp1);
$fpwrite = fopen($cache_file1,'w');
fputs($fpwrite, "$match1");
fclose($fpwrite);
}
include($cache_file1);
?> |
|