Scared of the Peacock Revolution since 2006
Blog » URL Shortener
I've finally gotten around to making my URL shortener database driven, rather than mod_rewrite and mod_php driven. Next thing I need to do is add some stat whoring, but that can wait.
It's such a basic implementation, that I used cat and echo to open source the code and one SHOW CREATE TABLE query for the schema. Complete source code, including the database schema, is available here.
It requires PHP 5.3, though you could probably rework it so it doesn't use gotos (yes, I used gotos. I have yet to be attacked because of them), then it just requires MySQLi, though that's easy enough to backport to MySQL. So it'll work in whatever version of PHP you want with minimal effort. (Yes, I could do it myself, but screw that.)
Released under the WTFPL, though feel free to give me things if you like it. Or if you don't like it. Just give me things.
Hehe, you said whoring again.
RSS feed for comments on this page | RSS feed for all comments
The days of visitation are come, the days of recompense are come; Israel shall know it: the prophet is a fool, the spiritual man is mad, for the multitude of thine iniquity, and the great hatred.
Powered by SilverStripe. Hosted by RimuHosting.
Unlease otherwise stated, all content is licenced under a Creative Commons Attribution-ShareAlike Licence.