Web Hosting Talk







View Full Version : readfile in php


silversurfer
11-05-2002, 02:41 PM
I got a script which utilises readfile fuction in php. What the script is supposed to do is to do something similar to anti-leech. The thing is that my files to be downloaded is on another server (due to size).

I got some problems with my host who said I am doing fxp on the site. (although what I am doing is just redirected)

I read in the manual that readfile function will write to the output buffer. Does that mean that the file is actually transferred to the host with the php scripts, before transferring to the downloader utilising bw on the host?

Rich2k
11-05-2002, 03:07 PM
Basically what is going on is it's reading the file onto the server with the PHP script before outputting which is a terrible waste of bandwidth.

However you should try the content disposition option (run a search as there was a big discussion a while back).