Jump to content

MrProgrammer

Members
  • Posts

    1
  • Joined

  • Last visited

Previous Fields

  • Languages
    persian

Profile Information

  • Location
    iran
  • Interests
    i am mrprogrammer
    live in iran
    can't say english nice but try
    my name is hosein

Contact Methods

  • Yahoo
    mrprogrammer2020

MrProgrammer's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. hello , this script for change download link and control fast download. tihs code is true but can't download with IDM(internet downlad manager) , what is problem? (i can't say english full , sorry) <?php $local_file = 'file.zip'; $download_file = 'download-name.zip'; $download_rate = 500; if(file_exists($local_file) && is_file($local_file)) { header('Cache-control: private'); header('Content-Type: application/octet-stream'); header('Content-Length: '.filesize($local_file)); header('Content-Disposition: filename='.$download_file); flush(); $file = fopen($local_file, "r"); while (!feof($file)) { print fread($file, round($download_rate * 1024)); flush(); sleep(1); } fclose($file); } else { die('Error: The file '.$local_file.' does not exist!'); }?>
×
×
  • Create New...