A URL shortening service no different to the approximately eleventy million already in existence, except that this one supports Gopher.
Also, I think it's actually fairly decently written. You may not.
An Apology of Sorts
So, it's taken me quite a while to get around to pushing this. This is mostly because I originally intended to clean this up before putting up on GitHub, but I've ended up deciding that I can't be bothered and it probably isn't worth the effort anyway.
- PHP 5.3.
- PostgreSQL (I use 8.3 on my server at present, but any vaguely recent version should be fine). I've no interest in maintaining a MySQL/SQLite/NoSQL port, but if you get it running and have a reasonably clean patch, feel free to submit a pull request.
To run the Gopher server:
- Some sort of inetd pointing at
gopher/server.php. I actually use inetd, because I have a couple of rather odd requirements, but xinetd should generally do the job as well.
- Create a database.
sql/create.sqlagainst that database.
config.phpand modify the values therein appropriately.
- Put the
webdirectory somewhere your Web server can find it.
- (Optional: for Gopher support) Configure your inetd (or inetd-alike) to
gopher/server.phpwhen you get requests on the port you want to use. (I'd strongly recommend port 70, because some Gopher implementations actually break when used against other ports, but it's up to you.)
There's no real support for theming, but the code is ridiculously simple. Pull
apart the PHP, CSS and JS files in
web and have at it. Similarly, you can
modify the PHP files in
gopher to change the text the Gopher server emits.