1) Project Details: PHP downloading from a remote file with resume

2) Payment method/ details: PayPal

Hello there I'm looking for someone to develop a php code to download a file from a remote server through another server to the user pc, its simple instead of saving the packet on the server you echo it to the browser and of course with proper headers i posted a working code here but i want you to do the following. also look at the picture, it will help u to understand better

- proper headers handling
- support resume
- proper range handling
- emptying the buffers after each packet (this is very important specially when downloading large files)

PHP Code:
$start_range 0;
$url URL to remote file
$end_range 
$filesize;
while(
$start_range <= $end_range) {
    if((
$start_range 9999999) > $end_range$range $start_range.'-';
    else 
$range $start_range.'-'.($start_range 9999999);
    
$ch curl_init();
    
curl_setopt($chCURLOPT_URL$url);
    
curl_setopt($chCURLOPT_FOLLOWLOCATION1);
    
curl_setopt($chCURLOPT_COOKIEFILE$cookie);
    
curl_setopt($chCURLOPT_REFERER$refurl);
    
curl_setopt($chCURLOPT_RANGE,$range);
    
curl_setopt($chCURLOPT_USERAGENT'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
    
curl_exec($ch);
    
curl_close($ch);
    
$start_range +=10000000;
    
flush();
        
ob_flush()



i will provide you with testing links once agreed on price