Downloading file from local network machine
| From: | Mayer, Jonathan | Date: | Fri, 05 Dec 2008 17:24:15 +0000 |
| Subject: | Downloading file from local network machine | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-284181@lists.php.net to get a copy of this message | ||
Hiya everyone,
I would like to present users to our internal intranet with a link to
download a file from a folder on a different machine on our local
network (such as \\computername\folder\file)
The file may be an HTML file, in which case the page should show in the
browser, or a file which requires saving to the user's local machine,
and which may be very big.
In IE, I could do something simple like
<a href='file://computername/folder/file.html'>click here</a>
But Firefox doesn't like doing this, for security reasons I think. I was
wondering whether there was a PHP solution. I have looked into fopen()
and fread() but not sure if this will help me.
I would like to hide all the working behind a form button so as to also
mask the download location, but that should be easy enough to do once I
get the basics working.
Any ideas?
Thanks,
Jon.