Added Curl conection method to ApiConnector::connectToApi()

With curl as an option, the ApiConnector can work when allow_url_fopen is unavailable. This is often the case on shared hosts and security hardened server.