Add JS demo and PHP implementation