Yup - I see that now. I suppose I could have opened the file and passed it through the surgu server but that uses bandwidth and defeats the purpose. I am now looking at using the Location: header to redirect to the file location once I have authenticated the user and logged the download.
If I have a test script like
<?PHP
$file = "http://www.fileserver.com/file.exe";
header("Location: $file");
?>
the it works fine. But if I put in some user logging above that then I run into problems. The browser displays the file as text. I am guessing the cookie headers I send before the Location headers are interfering?
I dunno. I'll keep trying I guess.
Stuart