Commit 69ddb031 authored by Kulya's avatar Kulya 😊

Billz curl req add progress func3

parent 0ffb523d
......@@ -272,13 +272,11 @@ require_once (__DIR__.'/keys.php');
}
public static function curlprogress($resource,$download_size, $downloaded, $upload_size, $uploaded){
if($download_size > 0)
if($download_size > 0){
// echo $downloaded / $download_size * 100;
$percDwn = $downloaded / $download_size * 100;
echo "\r Загружено: \033[32m".$percDwn."% \033[0m [\033[36m".$downloaded."\033 из 0m/".$download_size."...";
ob_flush();
flush();
sleep(1); // just to see effect
}
}
/**
* @var $data mixed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment