changed index file to PHP, added PHP lib, added template in index.php