private function curlDownloadInit(string $url, array $headers, $fp) {
        $c = curl_init($url);
        curl_setopt_array($c, [
            CURLOPT_FILE           => $fp,
            CURLOPT_FOLLOWLOCATION => true,
            CURLOPT_MAXREDIRS      => 100,
        ]);
        if (count($headers) > 0) {
            $headerList = [];
            foreach ($headers as $name => $value) {
                $headerList[] = "$name: $value";
            }
            curl_setopt($c, CURLOPT_HTTPHEADER, $headerList);
        }
        return $c;
    }
private function curlDownloadInit(string $url, array $headers, $fp) {
        $c = curl_init($url);
        curl_setopt_array($c, [
            CURLOPT_FILE           => $fp,
            CURLOPT_FOLLOWLOCATION => true,
            CURLOPT_MAXREDIRS      => 100,
        ]);
        if (count($headers) > 0) {
            $headerList = [];
            foreach ($headers as $name => $value) {
                $headerList[] = "$name: $value";
            }
            curl_setopt($c, CURLOPT_HTTPHEADER, $headerList);
        }
        return $c;
    }
@param string $url
@param array  $headers
@param        $fp

@return resource