Curl request with digest auth in PHP for download Bitbucket private repository
问题 I'm try to do this request on php, for download the last source from my Bitbucket private repository: curl --digest --user user:pass https://bitbucket.org/user/repo/get/tip.zip -o test.zip in command line its ok, the file download perfect, but in php dont work, this my php code: $out = fopen('test.zip', 'w+'); $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); curl_setopt($ch, CURLOPT