refactored resultcodes to constants
added .gitignore
Merge remote-tracking branch 'origin/master'

Conflicts:
	api/apiJSON.php