This is a tiny Registry for TWTXT I wrote in less than a day, it stores users in a file named twtxt.sqlite3
which is as his name says an SQLite3 database (it's .gitignore
'd so you can easily update).
The code is not the best I've ever done but it's correct.
Even if it's a one day project, it's open to any Pull Request/Feature Request/Issue Reporting on GitHub.
No logging. (but you can ip ban using $banned_ips
in ban.php
)
Using the good old way:
curl http://here is the instance url/add.php -F'name=Here is your name' -F'url=Here is the address of your twtxt
.
-
Users:
No, ask the admin of your instance with proofs to delete your link/user. -
Admins:
Use any tool to change the database (I recommend the CLI onesqlite3
), I'm not planning to do an admin panel.
- Checks that the URL is actually an URL,
- Checks the HTTP response code,
- Checks the MIME Type of the file,
- Checks that the user doesn't exist.
- PHP 7.4 & Apache2.4 on Debian 9.
- PHP 7.2 & Apache2.4 on Ubuntu 18.04.
git clone https://github.com/jusdepatate/twtxt-registry && cd twtxt-registry
,php check.php
(or go athttp://instance url/check.php
) look at the errors here and install all missing modules (forget the warnings).- That's all.