Php unit

Added PHPUnit tests
Refactored the code to use a Curl Library (Can mock the connection)
Code coverage is 100%