You can make it with Dini or MySql. I would like to suggest you to use Dini
What!? Dini is extremely outdated and very slow. I'd advice anything but using Dini.
OT: Browse the tutorial section and filterscripts section. There's bound to be a few tutorials on this as well as some released versions which you could either use directly or study and adapt.