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
Merge pull request #1 from hkal/master

Refactoring