Added error handling for 503 server side

Changed file_get_contents to curl(), then added error handling for 503
server side error.