Magic card database for websites
There's a program called Gatherer Extractor which can extract all info and images from Gatherer. You can export it to an XML file which you can import easily into (eg) a MySQL database.

You can check the sets which you want to download, and the info you want.

Link: http://forums.mtgsalvation.com/showthread.php?t=303454