Sample javaScript and PHP source code