The client (swf) is created with Flash 8.0 and counts about 15000 lines of code (all in actionscript).
The data persistence part is handled by a MySQL database but, as MySQL cannot be accessed directly by actionscript, Zanzarino had to create some wrappers to link both worlds.
Those wrappers are written in PHP. The client simply calls them with an HTTP POST and reads the result in plain text.
AI decks are all loaded at startup and while you play AI1, AI2, AI3 or FG, the only communication with the database is to store your score.
For t50, the game asks MochiAd for the list of the 50 top players, then randomly picks one, and finally retrieves the deck of this player from Zanzarino's database. Once the deck is loaded, there's no more communication with the server.
The hardest part is pvp/duel:
After each "end turn" from your side, your client sends the current game state to the server which stores it into the database and somehow transmits it to the other player.
I'm not 100% sure here, but I think the "standby" client just keeps asking for some news every second or so, until it gets a positive response from the server.