You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
5.4 KiB
PHP
171 lines
5.4 KiB
PHP
<?php
|
|
// prerequisite include for sites and components
|
|
require_once "+getenv.php";
|
|
require_once "$PROJECT_ROOT/php/utils/utils.php";
|
|
require_once "$PROJECT_ROOT/php/utils/servers-rooms.php";
|
|
|
|
// Read the server data from disk.
|
|
$servers_raw = file_get_contents($ROOMS_FILE);
|
|
|
|
// Decode the server data to an associative array.
|
|
$server_data = json_decode($servers_raw, true);
|
|
|
|
// Re-build server instances from cached server data.
|
|
$servers = CommunityServer::from_details_array($server_data);
|
|
|
|
// List all rooms from the cached servers.
|
|
$rooms = CommunityServer::enumerate_rooms($servers);
|
|
|
|
// Sort rooms by name and then host.
|
|
CommunityRoom::sort_rooms_str($rooms, 'name');
|
|
CommunityRoom::sort_rooms_by_pubkey($rooms);
|
|
|
|
// Set the last-updated timestamp
|
|
// to the time the server data file was last modified.
|
|
$timestamp = filemtime($ROOMS_FILE);
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<?php include "+components/page-head.php" ?>
|
|
|
|
<link rel="canonical" href="https://sessioncommunities.online/">
|
|
<link rel="stylesheet" href="./index.css">
|
|
<script type="module" src="./main.js"></script>
|
|
<title>Self-updating list of active Session communities</title>
|
|
<meta name="description" content="
|
|
Directory of Session Open Groups — public chatrooms within Session Messenger.
|
|
Copy these Communities into the Session app
|
|
and talk anonymously about Privacy, Security, or Cryptocurrency.
|
|
">
|
|
<meta name="modified" content="<?=date("Y-m-d H:i:s", $timestamp)?>">
|
|
<meta property="og:title" content="Click here for Session Communities">
|
|
<meta
|
|
property="og:description"
|
|
content="<?=count($rooms)?> Communities and counting — updated every day!"
|
|
>
|
|
<meta property="og:url" content="https://sessioncommunities.online/">
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:locale" content="en_US"/>
|
|
<meta name="timestamp" content="<?=$timestamp?>">
|
|
</head>
|
|
<body>
|
|
<input type="checkbox" id="toggle-theme-switch">
|
|
<div id="theming-root">
|
|
<header>
|
|
<div id="header-start"></div>
|
|
<div id="header-end">
|
|
<label
|
|
for="toggle-theme-switch"
|
|
class="anchorstyle"
|
|
title="Switch color theme"
|
|
>
|
|
Switch theme
|
|
</label>
|
|
<a
|
|
id="link-instructions"
|
|
target="_blank"
|
|
rel="help"
|
|
title="Mutli-language guide to joining communities using the site."
|
|
href="instructions.html"
|
|
>Instructions</a>
|
|
</div>
|
|
</header>
|
|
<h1 id="headline">Session Communities</h1>
|
|
<?php include "+components/qr_modals.php" ?>
|
|
|
|
<input type="checkbox" id="toggle-show-room-ids" class="hidden">
|
|
|
|
<?php include "+components/tbl_communities.php" ?>
|
|
|
|
<hr>
|
|
|
|
<footer>
|
|
<p id="server_summary">
|
|
<?=count_rooms($servers)?> unique Session Communities
|
|
on <?=count($servers)?> servers have been found.
|
|
<span id="servers_hidden">(None hidden as JS is off)</span>
|
|
</p>
|
|
<p id="last_checked">
|
|
Last checked <span id="last_checked_value">
|
|
<?=date("Y-m-d H:i:s", $timestamp)?> (UTC)
|
|
</span>.
|
|
</p>
|
|
<p id="disclaimer">
|
|
This site is not affiliated with
|
|
<a
|
|
href="https://optf.ngo"
|
|
target="_blank"
|
|
>Oxen Privacy Tech Foundation</a>.
|
|
<br>
|
|
Communities shown are fetched automatically from
|
|
<a
|
|
href="https://codeberg.org/gravel/sessioncommunities.online#which-sources-are-crawled"
|
|
target="_blank"
|
|
>various sources</a>.
|
|
<br>
|
|
<span class="js-only">
|
|
We make an attempt to hide communities containing
|
|
objectionable or illegal content, but
|
|
you should still proceed with caution.
|
|
</span>
|
|
<span class="noscript">
|
|
Proceed with caution when joining unofficial communities.
|
|
As JavaScript is disabled, no communities are filtered from the list.
|
|
</span>
|
|
</p>
|
|
<p class="noscript">
|
|
This site works fine without JavaScript.
|
|
However, some interactive features are
|
|
only available with JS enabled.
|
|
</p>
|
|
<p>
|
|
<label
|
|
for="toggle-show-room-ids"
|
|
class="clickable anchorstyle"
|
|
tabindex="0"
|
|
title="Shows a column with community identifiers
|
|
for developers or language data contributors.">
|
|
Toggle room identifier display
|
|
</label>
|
|
</p>
|
|
<nav>
|
|
<a
|
|
href="https://lokilocker.com/Mods/Session-Groups/wiki/Session-Closed-Groups"
|
|
target="_blank"
|
|
title="Closed groups curated by community moderators"
|
|
>Closed Groups</a>
|
|
<a
|
|
href="https://session.directory/"
|
|
target="_blank"
|
|
title="User-submitted closed groups, communities and user profiles. Not safe for work."
|
|
>session.directory</a>
|
|
<a
|
|
href="https://github.com/oxen-io/session-pysogs"
|
|
target="_blank"
|
|
title="Information about running a community server."
|
|
>Host Your Own Community</a>
|
|
<a
|
|
href="https://getsession.org/terms-of-service"
|
|
target="_blank"
|
|
>Session Terms Of Service</a>
|
|
</nav>
|
|
<nav>
|
|
<a
|
|
href="https://codeberg.org/gravel/sessioncommunities.online"
|
|
target="_blank"
|
|
title="sessioncommunities.online repository on Codeberg."
|
|
>Source Code</a>
|
|
<a
|
|
href="https://codeberg.org/gravel/sessioncommunities.online#contact"
|
|
target="_blank"
|
|
title="Information on how to contact the maintainer of sessioncommunities.online"
|
|
>Report an issue</a>
|
|
</nav>
|
|
</footer>
|
|
<div id="copy-snackbar"></div>
|
|
</div>
|
|
</body>
|
|
</html>
|