I am using the `header` function of PHP
to send the file to the browser with some small code. Its work well
and I have it so that if any one requests it with a referer other than my site
it redirects to a page first.
Unfortunately it's not working with the internet download manager.

What I want to know is how the rabidshare and 4shared sites do this.