Yes, that was exactly what I was looking for. A very good Perl script for running a chess board on one's server. It has a good routine that checks for legal moves. But it is not very user friendly, you have to type the coordinates of the move.
But I have some Javascript code that reads user clicks in the chess board and outputs the very same coordinates (e.g. e2 and e4).