Gemini Protocol library for PHP 8
Go to file
2024-04-20 17:01:09 +03:00
src fix namespace 2024-01-25 11:54:42 +02:00
.gitignore ignore tmp 2021-02-09 19:33:59 -08:00
composer.json fix namespace 2024-01-25 11:36:13 +02:00
LICENSE Add License 2021-08-26 21:07:09 -07:00
README.md add integration examples 2024-04-20 17:01:09 +03:00

Titan II

Composer / PHP 8 library for Gemini Protocol

Simply create online server with native IPv6 support for PHP apps or just static gemtext

Integrations

  • β-Doku - DokuWiki Satellite for Gemini Protocol
  • Pulsar - RSS Aggregator for Gemini Protocol
  • KVAZAR - KevaCoin Explorer for Gemini Protocol
  • KevaChat - Chat in BlockChain

Install

  1. composer require yggverse/titan-ii
  2. openssl req -x509 -newkey rsa:4096 -keyout key.rsa -out cert.pem -days 1 -nodes -subj "/CN=IP"
  3. php server.php
  4. gemini://[IP]

Usage

<?php

$server = new \Yggverse\TitanII\Server();

$server->setCert('cert.pem');
$server->setKey('key.rsa');

$server->setHandler(
    function (\Yggverse\TitanII\Request $request): \Yggverse\TitanII\Response
    {
        $response = new \Yggverse\TitanII\Response();

        $response->setCode(20);
        $response->setMeta('text/plain');
        $response->setContent('Hello World!');

        return $response;
    }
);

$server->start('IP', 1965);