I'd like to run checks to see if a given URL is registered or not. As a simple proxy for testing if it's registered, I was going to check HTML response codes. 200, 300 probably == registered, 4xx probably == not registered.
I understand that there might be holes in this logic. My question is if cURL has a way to return the HTML response code neatly? I currently can print out the entire header, and am wondering if I need to parse out the bit I want on my own, or if it can return the whole header as an array.
A direct answer or a great alternative would both be welcome.