First version of server-side script.