mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-10-09 05:25:31 +00:00
Fix #405: Support resume for Curl::download()
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Helper;
|
||||
|
||||
use Curl\Curl;
|
||||
@@ -67,6 +68,15 @@ function create_tmp_file($data)
|
||||
return $tmp_file;
|
||||
}
|
||||
|
||||
function get_tmp_file_path()
|
||||
{
|
||||
// Return temporary file path without creating file.
|
||||
$tmp_file_path =
|
||||
rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) .
|
||||
DIRECTORY_SEPARATOR . 'php-curl-class.' . uniqid(rand(), true);
|
||||
return $tmp_file_path;
|
||||
}
|
||||
|
||||
function get_png()
|
||||
{
|
||||
$tmp_filename = tempnam('/tmp', 'php-curl-class.');
|
||||
|
||||
Reference in New Issue
Block a user