ALEXIS yazdı:googlesitemapgenerator.php XML çıkışı veriyor zaten.
$phpbb_root_path = './';
$phpbb_root_path = './forum/';
<?php
/***************************************************************************
* googlesitemapgenerator.php
* -------------------
* Copyright/Support http://www.pentapenguin.com
* Last Modified: 06/05/05
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . "common.$phpEx");
// Begin Configuration Section
$included_forum_ids = array();
$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-dTG:i:s+00:00', $row['topic_time']);
$viewtopic = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id";
$priority = ( $row['topic_type'] == POST_STICKY || $row['topic_type'] == POST_ANNOUNCE ) ? '1.0' : '0.5';
$output .= "<url>n";
$output .= "t<loc>$protocol$servername$port$path$viewtopic" . "</loc>n";
$output .= "t<lastmod>$lastmodified</lastmod>n";
$output .= "t<changefreq>daily</changefreq>n";
$output .= "t<priority>$priority</priority>n";
$output .= "</url>nn";
}
$output .= "</urlset>n";
header('Content-type: application/xml');
echo $output;
?>
<?php
/***************************************************************************
* googlesitemapgenerator.php
* -------------------
* Copyright/Support http://www.pentapenguin.com
* Last Modified: 06/05/05
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . "common.$phpEx");
// Begin Configuration Section
$included_forum_ids = array();
$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\TG:i:s+00:00', $row['topic_time']);
$viewtopic = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id";
$priority = ( $row['topic_type'] == POST_STICKY || $row['topic_type'] == POST_ANNOUNCE ) ? '1.0' : '0.5';
$output .= "<url>\n";
$output .= "\t<loc>$protocol$servername$port$path$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;
?>
#-----[ OPEN ]------------------------------------------
#
includes/sessions.php
#
#-----[ FIND ]------------------------------------------
#
else
{
$sessiondata = array();
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
#
#-----[ AFTER ADD ]------------------------------------------
#
global $HTTP_SERVER_VARS;
if ( empty($session_id) && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') )
{
$sessiondata = array();
$session_id = md5(d8ef2eab);
$sessionmethod = SESSION_METHOD_GET;
}
#
#-----[ FIND ]------------------------------------------
#
$session_id = md5(uniqid(mt_rand(), true));
#
#-----[ REPLACE WITH ]------------------------------------------
#
# Note: d8ef2eab is one of the googlecrawlbots ips
#
//$session_id = md5(uniqid(mt_rand(), true));
global $HTTP_SERVER_VARS;
$session_id = ( !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') ) ? md5(uniqid(mt_rand(), true)) : md5(d8ef2eab);
#
#-----[ FIND ]------------------------------------------
# Yes, find it again, we do 2 replaces of the same code
#
else
{
$sessiondata = array();
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
#
#-----[ AFTER ADD ]------------------------------------------
#
global $HTTP_SERVER_VARS;
if ( empty($session_id) && strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') )
{
$sessiondata = array();
$session_id = md5(d8ef2eab);
$sessionmethod = SESSION_METHOD_GET;
}
#
#-----[ FIND ]------------------------------------------
#
if ($ip_check_s == $ip_check_u)
#
#-----[ REPLACE WITH ]------------------------------------------
#
//if ($ip_check_s == $ip_check_u)
if (($ip_check_s == $ip_check_u) || ($session_id == md5(d8ef2eab)&&(strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot'))))
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir