Commit 0fc0bf52 authored by Kulya's avatar Kulya 😊

Billz curl req add progress func4

parent 69ddb031
...@@ -183,7 +183,7 @@ require_once (__DIR__.'/keys.php'); ...@@ -183,7 +183,7 @@ require_once (__DIR__.'/keys.php');
$sendData = json_encode($arData); $sendData = json_encode($arData);
$result["params"] = $sendData; $result["params"] = $sendData;
$result["url"] = $url; $result["url"] = $url;
// ob_start();
try try
{ {
$obCurl = curl_init(); $obCurl = curl_init();
...@@ -276,6 +276,8 @@ require_once (__DIR__.'/keys.php'); ...@@ -276,6 +276,8 @@ require_once (__DIR__.'/keys.php');
// echo $downloaded / $download_size * 100; // echo $downloaded / $download_size * 100;
$percDwn = $downloaded / $download_size * 100; $percDwn = $downloaded / $download_size * 100;
echo "\r Загружено: \033[32m".$percDwn."% \033[0m [\033[36m".$downloaded."\033 из 0m/".$download_size."..."; echo "\r Загружено: \033[32m".$percDwn."% \033[0m [\033[36m".$downloaded."\033 из 0m/".$download_size."...";
// ob_flush();
// flush();
} }
} }
/** /**
......
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