I dont understand when I echo $httpCode I always get 0, I was expecting 404 when I change $html_brand into a broken url. Is there anything that I miss or do not know of? Tha
Like said here and below, a failed request (i.e. the server is not found) returns false, no HTTP status code, since a reply has never been received.
Call curl_error().