Tengo este generador de sitemap en mi pagina phpnuke 7.6 solo l tengo para los foros que es lo que suele cambiar a menudo pero en google me dice que existe espacios en blanco al inicio ¿sabeis en que parte del codigo se pueden generar esos espacios?
Código:
<?php define('IN_PHPBB', true); $phpbb_root_path = 'modules/Forums/'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . "common.$phpEx"); // Begin Configuration Section $included_forum_ids = array(1, 2, 4, 7); $excluded_forum_ids = array(); // End Configuration Section if ( count($included_forum_ids) > 0 ) { $included_forum_ids_sql = 'forum_id IN (' . implode(', ', $included_forum_ids) . ')'; } if ( count($excluded_forum_ids) > 0 ) { $excluded_forum_ids_sql = 'forum_id NOT IN (' . implode(', ', $excluded_forum_ids) . ')'; } if ( ( count($included_forum_ids) > 0 ) && ( count($excluded_forum_ids) > 0 ) ) { $and = 'AND'; } if ( ( count($included_forum_ids) > 0 ) || ( count($excluded_forum_ids) > 0 ) ) { $where = 'WHERE'; } $sql = "SELECT topic_id, forum_id, topic_time, topic_type FROM " . TOPICS_TABLE . " $where $included_forum_ids_sql $and $excluded_forum_ids_sql ORDER BY topic_time DESC"; if ( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error: could not retrive topic IDs', '', __LINE__, __FILE__, $sql); } $protocol = ( $board_config['cookie_secure'] == 0 ) ? 'http://' : 'https://'; $servername = $board_config['server_name']; $port = ( $board_config['server_port'] == '80' ) ? '' : ':' . $board_config['server_port']; $path = $board_config['script_path']; $output = '<' . '?xml version="1.0" encoding="UTF-8"?' . '>' . "\n"; $output .= '<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">'."\n"; while ( $row = $db->sql_fetchrow($result) ) { $topic_id = $row['topic_id']; $forum_id = $row['forum_id']; $lastmodified = date('Y-m-d\TH:i:s+00:00', $row['topic_time']); $viewtopic = "postt$topic_id.html"; $priority = ( $row['topic_type'] == POST_STICKY || $row['topic_type'] == POST_ANNOUNCE ) ? '1.0' : '0.5'; $output .= "<url>\n"; $output .= "\t<loc>$protocol$servername$port$viewtopic" . "</loc>\n"; $output .= "\t<lastmod>$lastmodified</lastmod>\n"; $output .= "\t<changefreq>daily</changefreq>\n"; $output .= "\t<priority>$priority</priority>\n"; $output .= "</url>\n\n"; } $output .= "</urlset>\n"; header('Content-type: application/xml'); echo $output; ?>