added config file and updated access permissions
it never hurts to have a .gitignore
added query urls to config
fixed typo in config file
refactored php; removed repeated logic