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
Try this:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);