logURL();
$seconds_to_cache = 72000;
$ts = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";
//header("Content-type: text/html; charset=utf-8");
header("Content-type: text/xml; charset=utf-8");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('X-UA-Compatible: IE=edge,chrome=1');
header('X-XSS-Protection: 1; mode=block');
header('X-Frame-Options: DENY');
header('X-Content-Type-Options: nosniff');
//create your XML document, using the namespaces
$urlset = new SimpleXMLElement('');
$max_count = 50000;
$max_counterfl = 0;
$blog_path = "/home/www/wwwartikelschreiber/texts/";
$files = scandir($blog_path);
for ($y=0; $y";
//echo stripos($files[$y], '.html') . "
";
if (strlen($files[$y]) > 10 and stripos($files[$y], '.html') !== false){
$contains_sum = array();
//echo " IN " .$myfinfile . "
";
if($dom->loadHTMLFile($myfinfile)) { // https://stackoverflow.com/questions/399332/fastest-way-to-retrieve-a-title-in-php
$list = $dom->getElementsByTagName("span"); #title
$contains_sum = array();
for ($x=0; $x<$list->length - 1; $x++){
$text = $list->item($x)->textContent;
$isBadEntry = $Func->isBadBlogContent($text);
array_push($contains_sum, $isBadEntry);
} // for ($x=0; $x<$list->length - 1; $x++){
}; // if($dom->loadHTMLFile($myfinfile)) {
if (array_sum($contains_sum) < 2){ // weniger als 2 Stopwort Listen Einträge bei ca. 16 Content einträgen bei tplv3/index_show_en.tpl
//if($dom->loadHTMLFile($myfinfile)) {
//$list_title = $dom->getElementsByTagName("title"); #title
//$title = $list_title->item(0)->textContent;
$myfinurl = $url.$files[$y];
if ($Func->endsWith($myfinurl,".html")){
//if (strlen($title) > 7 and $Func->endsWith($myfinurl,".html")){
//$title = $Secu->sanitizeForJsonOption($title);
//$title = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $title);
if ( $max_counterfl < $max_count){
$url = $urlset->addChild('url');
$url->addChild('loc',"https://www.artikelschreiber.com/texts/$myfinurl" );
$url->addChild('lastmod', date("Y-m-d", filemtime($myfinfile)) );
$url->addChild('changefreq', 'yearly'); //weekly etc.
$url->addChild('priority', "0.44");
$max_counterfl++;
}; // if ( $max_counterfl < $max_count){
}; // if ($Func->endsWith($myfinurl,".html")){
//}; // if($dom->loadHTMLFile($myfinfile)) {
};// if (array_sum($contains_sum) < 2){
$contains_sum = array();
}; // if (strlen($files[$y]) > 10 stripos($files[$y], '.php') !== True){
}; //for ($y=0; $iyaddChild('url');
$url->addChild('loc',"https://www.artikelschreiber.com/texts/" );
$url->addChild('lastmod', date("Y-m-d") );
$url->addChild('changefreq', 'daily'); //weekly etc.
$url->addChild('priority', "0.85");
$url = $urlset->addChild('url');
$url->addChild('loc',"https://www.artikelschreiber.com/texts/feed.php" );
$url->addChild('lastmod', date("Y-m-d") );
$url->addChild('changefreq', 'daily'); //weekly etc.
$url->addChild('priority', "0.75");
//add whitespaces to xml output (optional, of course)
$dom = new DomDocument();
$dom->loadXML($urlset->asXML());
$dom->formatOutput = true;
//output xml
echo $dom->saveXML();
exit(0);
?>