forked from Flajakay/minecraftserverlistphp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sitemap.php
57 lines (40 loc) · 1.1 KB
/
sitemap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
header('Content-type: text/xml');
include 'core/init.php';
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc><?php echo $settings->url . 'index'; ?></loc>
</url>
<url>
<loc><?php echo $settings->url . 'login'; ?></loc>
</url>
<url>
<loc><?php echo $settings->url . 'register'; ?></loc>
</url>
<url>
<loc><?php echo $settings->url . 'lost-password'; ?></loc>
</url>
<url>
<loc><?php echo $settings->url . 'resend-activation'; ?></loc>
</url>
<url>
<loc><?php echo $settings->url . 'servers'; ?></loc>
</url>
<?php
$result = $database->query("SELECT `address`, `connection_port` FROM `servers` WHERE `active` = '1' AND `private` = '0'");
while($server = $result->fetch_object()){
?>
<url>
<loc><?php echo $settings->url . 'server/' . $server->address . ':' . $server->connection_port; ?></loc>
</url>
<?php } ?>
<?php
$result = $database->query("SELECT `url` FROM `categories`");
while($category = $result->fetch_object()){
?>
<url>
<loc><?php echo $settings->url . 'category/' . $category->url; ?></loc>
</url>
<?php } ?>
</urlset>