Re: How'd They Do That?
by "Jens Brueckmann" <lists(at)j-a-b.net>
|
Date: |
Mon, 07 Feb 2005 19:40:20 +0100 |
To: |
"hwg-techniques(at)hwg.org" <hwg-techniques(at)hwg.org> |
References: |
localhost |
|
todo: View
Thread,
Original
|
|
On Sun, 06 Feb 2005 18:41:50 -0600, David Kendall
<david(at)homepagesplus.com> wrote:
> Somewhat helpful, but, if you may recall, I don't know thing one
> about PHP. I tried to download a few scripts off the web (the best
> was at http://elouai.com/force-download.php, also tried the one
> near the top of the user contributed notes on the
> http://de.php.net/header page you passed along), but still couldn't
> make ti work for me. For starters I have no idea what the syntax is
> to use. (For example, to use it, do I just use
> http://mypage.com/php-file-i-created.php?filename="file-i-want-to-
> download.mid" or something else? Do I paste the code from these
> scripts in between normal HTML headers (that is
> <html><head><title></title></head><body>PHP GOES
> HERE</body></html>?
A good introduction to PHP is "PHP 101" at
<http://www.zend.com/php5/abs/index.php>
Concerning the script, put it into a separate file named e.g. download.php
Then, on another page where you offer to download a file, say music.mid,
make a link to download.php with a query string appended:
<a href="download.php?file=music.mid">download file</a>
Cheers,
jens
--
Jens Brueckmann
http://www.j-a-b.net/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA