* refactor getIP.php moving functionality into separate functions
* add some error checks
* remove closing php tags
* uniformly use single quotes for strings
most strings already used single quotes, some used double quotes
* refactor garbage moving functionality into functions