Stop curl from getting more data than the http buffer
Stop curl from displaying error messages upon failures
Display curl error message to STDOUT
Limit pcre to only search the received bytes rather than the entire buffer
Made curl follow up to 5 redirects