mirror of https://github.com/YGGverse/titan-II.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yggverse
3998d085d0
|
7 months ago | |
---|---|---|
src | 10 months ago | |
.gitignore | 4 years ago | |
LICENSE | 3 years ago | |
README.md | 7 months ago | |
composer.json | 10 months ago |
README.md
Archived!
Use Ratchet IoServer
- asynchronous WebSocket in PHP as more featured replacement to this library.
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 with build-in Titan-II server
- KVAZAR - KevaCoin Content Explorer
- KevaChat - Chat in KevaCoin BlockChain
Install
composer require yggverse/titan-ii
openssl req -x509 -newkey rsa:4096 -keyout key.rsa -out cert.pem -days 1 -nodes -subj "/CN=IP"
php server.php
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);