Make curl requests work and not display on page. Handle errors correctly.