Page 1 of 1

How will this affect server usage?

Posted: Tue Feb 05, 2008 2:57 pm
by Winkles
I'm putting up a service that will host some large files, but that needs to hide the actual locations of the files. I found a script (http://www.zubrag.com/scripts/download.php) that will help with this. The crux of the script is that it pipes through the data from the file in the following manner.

Code: Select all

$file = @fopen($file_path,"rb");
if ($file) {
  while(!feof($file)) {
    print(fread($file, 1024*8));
    flush();
    if (connection_status()!=0) {
      @fclose($file);
      die();
    }
  }
  @fclose($file);
}
My question is, how will this type of activity affect my server usage allowances? I don't imagine that it will increase my bandwidth usage at all, but I worry that asking a script to handle all outgoing data might significantly increase my CPU usage and therefore get me in trouble with my host. Does anyone know if this is the case?

Re: How will this affect server usage?

Posted: Tue Feb 05, 2008 5:04 pm
by Christopher
The script won't change your bandwidth allowances because it is downloading the same file. I doubt if will effect the CPU much because it is doing the same thing that the web server would be doing anyway.