<?php
exec ("wget -O tagesschau.html tagesschau.de");
exec ("wget -O taz.html taz.de");
$tagesschaustr = file_get_contents ("./tagesschau.html");
$tazstr = file_get_contents ("./taz.html");
$tagesschaustr = explode ("<body>", $tagesschaustr) [1];
$tazstr = explode ("<body>", $tazstr) [1];
//echo htmlentities ($tagesschaustr) . "<br><br>";
//echo htmlentities ($tazstr);
//$tagesschaustr = preg_replace ("/<\/[a-z]+>/", " ", $tagesschaustr);
//$tagesschaustr = preg_replace ("/<\/[a-z]+>/", " ", $tagesschaustr);
$tagesschaustr = preg_replace ("/\<[^\>]*\>/", ",", $tagesschaustr);
$tagesschaustr = str_replace ("\n", "", $tagesschaustr);
$tagesschaustr = str_replace ("\t", "", $tagesschaustr);
$tagesschaustr = str_replace ("\r", "", $tagesschaustr);
$tagesschaustr = str_replace (" ", ",", $tagesschaustr);
;
echo htmlentities ($tagesschaustr);
//$tagesschaustr = str_replace ("ddddeeee", " ", implode(explode ("<", $tagesschaustr)));
//echo $tagesschaustr;
?>