added gitignore and ignore the .idea directory
created index.php and moved code into that.