Reply
Want a basic download page?
Old 06-01-2008, 11:10 AM Want a basic download page?
g0hwc.com's Avatar
Experienced Talker

Posts: 32
Name: Paul Young
Location: Clacton on Sea, Essex, England
Hi all,
im on a steep learning curve and trying to work out how to make a
downloadable link ?

IE: click here to download file

Many thanks in advance.

< create a signature >

Last edited by chrishirst : 06-01-2008 at 11:49 AM.
g0hwc.com is offline
Reply With Quote
View Public Profile Visit g0hwc.com's homepage!
 
When You Register, These Ads Go Away!
     
Old 06-01-2008, 11:50 AM Re: Want a basic download page?
chrishirst's Avatar
Super Moderator

Posts: 12,649
Location: Blackpool. UK
HTML Code:
<a href="url_of_file">click here to download file</a>
is the way it's done in HTML
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-01-2008, 12:07 PM Re: Want a basic download page?
g0hwc.com's Avatar
Experienced Talker

Posts: 32
Name: Paul Young
Location: Clacton on Sea, Essex, England
Many thanks for that Chris.
Just tried that. But the files are "xxx.html" and it just shows the page..

will I have to rename the files ?

Paul
< removed >

Last edited by chrishirst : 06-01-2008 at 01:26 PM.
g0hwc.com is offline
Reply With Quote
View Public Profile Visit g0hwc.com's homepage!
 
Old 06-01-2008, 12:14 PM Re: Want a basic download page?
Novice Talker

Posts: 11
Chris don't you need to have a FTP client to have downloadable links?
AssaultM16 is offline
Reply With Quote
View Public Profile
 
Old 06-01-2008, 01:31 PM Re: Want a basic download page?
chrishirst's Avatar
Super Moderator

Posts: 12,649
Location: Blackpool. UK
Quote:
Originally Posted by g0hwc.com View Post
Many thanks for that Chris.
Just tried that. But the files are "xxx.html" and it just shows the page..

will I have to rename the files ?

Paul
< removed >
You could, or you could use server side code to send the download as a generic or unknown mime type.

Quote:
Originally Posted by AssaultM16 View Post
Chris don't you need to have a FTP client to have downloadable links?
Nope. HTTP downloads have been around a good number of years now
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-01-2008, 05:01 PM Re: Want a basic download page?
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
You could try taring, gzipping, or just plain zipping them. (Any archive would do). That would reduce bandwidth slightly. Also you could have them right click and save as.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Old 06-01-2008, 05:08 PM Re: Want a basic download page?
g0hwc.com's Avatar
Experienced Talker

Posts: 32
Name: Paul Young
Location: Clacton on Sea, Essex, England
Many thanks for all the help with this.
I have now zipped the files and works a treat..

Thanks again

< removed again >

Last edited by chrishirst : 06-01-2008 at 06:19 PM.
g0hwc.com is offline
Reply With Quote
View Public Profile Visit g0hwc.com's homepage!
 
Old 06-02-2008, 10:28 AM Re: Want a basic download page?
pjaj's Avatar
Average Talker

Posts: 17
Name: Peter Jennings
Location: Oxfordshire UK
I know you have a solution, but the fundamental problem with most browsers is that if it thinks it can display the file (html, jpeg, txt) then it will. If it doesn't know how then it will offer to download / store the file (zip, doc, xls etc).

pdf is a slightly grey area depending upon whether you've got the reader installed, but I guess 99% have. You can always save the file once the reader has displayed it.

So the trick to force a download is to get your file in a format (with an extension) that browsers won't / can't display.
pjaj is offline
Reply With Quote
View Public Profile
 
Old 06-02-2008, 09:53 PM Re: Want a basic download page?
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
No, the trick is throwing a generic/unknown header for the file that forces it to download it.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Reply     « Reply to Want a basic download page?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14804 seconds with 13 queries