Sitemap
' . $protocol . $_SERVER['SERVER_NAME'] . $levelup . '/
1.0
daily
' . $c_date . '
';
file_put_contents("../sitemap.xml", $data);
$rec_limit = 10;
$query = "SELECT count(id) FROM pastes";
$retval = mysqli_query($con, $query);
$row = mysqli_fetch_array($retval);
$rec_count = Trim($row[0]);
$offset = 0;
// Set the specific query to display in the table
$sql = "SELECT * FROM `pastes` WHERE visible='0' LIMIT $offset, $rec_count ";
$result = mysqli_query($con, $sql);
// Loop through each record
while ($row = mysqli_fetch_array($result)) {
$paste_id = Trim($row['id']);
$site_data = file_get_contents("../sitemap.xml");
$site_data = str_replace("", "", $site_data);
if (PP_MOD_REWRITE) {
$server_name = $protocol . $_SERVER['SERVER_NAME'] . $levelup . "/" . $paste_id;
} else {
$server_name = $protocol . $_SERVER['SERVER_NAME'] . $levelup . "/paste.php?id=" . $paste_id;
}
$c_date = date('Y-m-d');
$c_sitemap = '
' . $server_name . '
' . $priority . '
' . $changefreq . '
' . $c_date . '
';
$full_map = $site_data . $c_sitemap;
file_put_contents("../sitemap.xml", $full_map);
}
}
?>
sitemap.xml rebuilt