Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 09-07-2008, 12:45 PM   #1
Active Warrior
War Room Member
 
squeezecpa's Avatar
 
Join Date: Aug 2008
Location: United Kingdom Birmingham
Posts: 92
Thanks: 23
Thanked 1 Time in 1 Post
Default How do i upload files for my website for download.

Hi, i am not too clued when it comes to web design. I have just downloaded filezilla and uploaded an ebook to a folder on my server, but not sure how i can provide a download link for my customers to download that ebook.

I know it sounds silly and i think i am nearly there. Hope someone can enlighten me on this.
Thanks in advance.
squeezecpa is offline   Reply With Quote
Old 09-07-2008, 03:42 PM   #2
dar
Active Warrior
 
Join Date: Sep 2008
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: How do i upload files for my website for download.

If you uploaded the ebook to your "www" folder, you can get people to download it by making a link that points to:

http://www.example.com/ebook.pdf

Obviously replace example.com with your website name and ebook.pdf with the file name of your actual ebook.

If you uploaded it to a subdirectory, all you have to do is change the path.
For example, if you uploaded to "www/downloads/ebook.pdf", you would link to "http://example.com/downloads/ebook.pdf"


To make a link, see here:
HTML Links
dar is offline   Reply With Quote
Old 09-07-2008, 05:50 PM   #3
and his shiny metal ...
War Room Member
 
ThomM's Avatar
 
Join Date: Apr 2004
Location: 42.751109°N 73.408756°W
Posts: 1,407
Thanks: 528
Thanked 1,079 Times in 754 Posts
Social Networking View Member's FaceBook Profile  View Member's YouTube Profile
Default Re: How do i upload files for my website for download.

If you link to the PDF then when anyone clicks on it, it will open the PDF and they won't actually download it unless they save it when it is open.
Robert Plank put this code in the main forum last year that will make the PDF downloadable.

<?php

// Change this to the filename of your PDF file
$filename = "filename.pdf";

if (!file_exists($filename)) {
header("HTTP/1.0 404 Not Found");
echo "<h1>404 Not Found</h1>";
die();
}

header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="' . basename($filename) . '"');
echo file_get_contents($filename);
die();

?>

Change the filename that's underlined above to the name of your PDF.
Copy the code to to a blank file in wordpad or what ever text editor you use and name it what ever you want with a .php extension, like ebook.php
Upload that and the PDF to your site and on the web page link to that file like this http://sitename.com/ebook.php
Then when they click on the link it will download to their computer instead of opening in their browser.

I Donated to KimW - give a sig link to Kim W
Life: Nature's way of keeping meat fresh
Always remember that you are unique. Just like everyone else.
No matter how deep the ocean is, you can still break a window with a hammer
Getting old ain't for sissy's
ThomM is offline   Reply With Quote
Old 09-08-2008, 01:54 AM   #4
HyperActive Warrior
 
MikeHayes's Avatar
 
Join Date: Mar 2008
Location: Amsterdam , Netherlands.
Posts: 156
Thanks: 3
Thanked 1 Time in 1 Post
Contact Info
Send a message via Skype™ to MikeHayes
Default Re: How do i upload files for my website for download.

Hi,

Just a thought.

If someone stumbles across your download folder they could get access without you knowing so include an index.html in the folder as follows.
**********************************
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta name="robots" content="noindex,nofollow">
</HEAD>
<BODY>
<CENTER>
<TABLE BGCOLOR="white" WIDTH="650" BORDER="5" BORDERCOLORDARK="gray" BORDERCOLORLIGHT="white" CELLPADDING="5">
<CENTER>
<tr>
<th>You are not allowed to access this area. Please <a href="http://www.your-domain.com">click here</a> to go to our main page.
</th>
</tr>
</center>
</table>
</body>
*************************************************

Good luck

Quicksilver
The HTML Book, with free HTML code.
MikeHayes is offline   Reply With Quote
Old 09-08-2008, 10:31 AM   #5
HyperActive Warrior
War Room Member
 
Join Date: Aug 2008
Location: Adelaide, South Australia
Posts: 327
Thanks: 54
Thanked 23 Times in 18 Posts
Contact Info
Send a message via Skype™ to ripsnorta2
Default Re: How do i upload files for my website for download.

Quicksilver has a good point, but instead of giving them a nasty error message, it might be better to just redirect them to the main page. Or better yet, redirect them to a sales page!

Just do this with an index.php file and put the redirection code in that.

Code:
<? header("Location: http://www.mysite.com/buythisproductnow"); ?>

Cheers, John
ripsnorta2 is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design

Tags
download, files, upload, website

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

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



All times are GMT -6. The time now is 04:12 AM.