Description
Hi, I used the following code to download Zoom recordings (I’ve stored the zoom download URLs in a database previously and process these in a foreach collection):
$token=$this->zoomjwt->generateJWTKey();
$file_path = $video[‘download_url’].“?access_token=$token”;
$filename = $video[‘recording_id’]. ‘.’ . strtolower($video[‘file_type’]);
$destination = $topic_path .‘/’. $filename;$fp = fopen ($destination, ‘w+b’);
$options = array(
CURLOPT_FILE => $fp,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_URL => $file_path,
CURLOPT_FAILONERROR => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_TIMEOUT => 7200,
CURLOPT_TCP_KEEPALIVE => 1,
CURLOPT_TCP_KEEPIDLE => 2,
);$ch = curl_init();
curl_setopt_array($ch, $options);$result = curl_exec($ch);
$status = 0;
if (!curl_errno($ch)) {
$info = curl_getinfo($ch);
$status = (int)$info[‘http_code’];
}
else {
echo curl_error($ch) .PHP_EOL;
}
curl_close($ch);
fclose($fp);if($status == 200)
{
echo ‘------ Zoom Donwload OK (’.date(‘H:i:s’).') '.PHP_EOL;}
Error
The code works nice with small/medium files. The problem is with big files, from 700MB to up the connection is unstable and I get different messages:
“openssl ssl_read ssl_error_syscall errno 10054”
“SSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol”
What kind of errors are these? is it a problem with the apache config or a firewall? why with big files?
Do you know another method to download the files? (with php if it possible)? I’ve tried chunked the donwload (PHP: File downloader function - Downloading files in chunks. · GitHub), but always returns 0bytes… I think it happens for the url token.
I’d appreciate any information
Thanks
Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT
Which Endpoint/s?
https://api.zoom.us/v2/accounts/me/recordings