You can have a look at my JewelQuest codes. I also included the
php used. Im no php guy, so they are horrible, but work for
basic communication.
(server sends changed "world" data, client sends specific gamedata)

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=310529#Post310529

For a game, as you describe it, php should be the perfect solution.
Also since there are free online servers that can handle the game.
Nicer that having to run a server yourself.