replaced file_get_contents with cURL.