I was able to fix it by adding the line
curl_setopt($ch, CURLOPT_USERAGENT, “Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36”);
Without the user agent set, I was basically downloaded a “400 Bad Request Error”.