Inviting Bad Practice Solutions

Once again I'm considering using the wrong tool for a task. I guess I like to stretch the limits of stuff.

I'd like to make a CGI script-based twtxt interface. The use case I'm imagining (which may or may not be a complete strawman, but it's interesting) goes something like this:

This means that the tool I'd like to make must:

Now, something like this should of course be a web service and run on a server where the admin sets it up. But there are already solutions out there for that. This is a more interesting problem to solve.

Any tips?

-- CC0 Björn Wärmedal