Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > VodaHost Web Hosting Support > Scripts & Fantastico

Notices

Scripts & Fantastico Discussions, help and troubleshooting scripts included is adding popular Fantastico scripts to your website such as guest books, osCommerce shopping cart, polls, content management systems etc…

Closed Thread
 
Thread Tools
  #1  
Old 10-13-2008, 07:23 PM
Sergeant First Class
 
Join Date: Mar 2008
Posts: 54
Default How can I Build a File Download Script ?

Thanks to all who assist!

I need to create a simple download script to download files (gif images) from my site that are not zip files.

If anyone knows where I can get one, please let me know

Thanks,

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #2  
Old 10-13-2008, 07:53 PM
Karen Mac's Avatar
General & Forum Moderator
 
Join Date: Apr 2006
Location: X marks the spot
Posts: 8,474
Send a message via MSN to Karen Mac
Default Re: How can I Build a File Download Script ?

You can simply link to the picture and they right click save as or save target as. No script needed.

Karen
__________________
KMAC Enterprise
Missouri Free Classified Ads
Charming Noveltees~Sports Logos Charms

I've learned that artificial intelligence is no match for natural stupidity!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old 10-13-2008, 10:17 PM
Sergeant First Class
 
Join Date: Mar 2008
Posts: 54
Default Re: How can I Build a File Download Script ?

I am looking to an alternative to the right click option.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old 10-13-2008, 10:28 PM
davidundalicia's Avatar
General & Forum Moderator
 
Join Date: Mar 2006
Location: Mallorca, Spain
Posts: 6,437
Default Re: How can I Build a File Download Script ?

Are you looking for a PAID download script or are these for free ?¿
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old 10-14-2008, 01:22 AM
Sergeant First Class
 
Join Date: Mar 2008
Posts: 54
Default Re: How can I Build a File Download Script ?

Free would be best

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old 10-14-2008, 01:44 AM
davidundalicia's Avatar
General & Forum Moderator
 
Join Date: Mar 2006
Location: Mallorca, Spain
Posts: 6,437
Default Re: How can I Build a File Download Script ?

What I meant was are the images free to download ?¿
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old 10-14-2008, 08:53 PM
Sergeant First Class
 
Join Date: Mar 2008
Posts: 54
Default Re: How can I Build a File Download Script ?

yes, the images are free to download

Thanks for the response. Any suggestions would be appreciated.

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old 10-14-2008, 08:57 PM
davidundalicia's Avatar
General & Forum Moderator
 
Join Date: Mar 2006
Location: Mallorca, Spain
Posts: 6,437
Default Re: How can I Build a File Download Script ?

Well you have the 2 suggestions

click and save/download
or a zip file.............

cant think of anything else.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #9  
Old 10-14-2008, 10:54 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,052
Default Re: How can I Build a File Download Script ?

Or use a downloader script...... There are specific ones, depending on whether the file type and size are stored somewhere or not. Or, you may pass the type and size your self.

Here is one:
<?php
$fileID = $_GET['fileID'];
$file_path = $_GET['product_file_path'];
$file_name = $_GET['product_file_Name'];
$file_size = $_GET['product_file_Size'];
$file_type = $_GET['product_file_Type'];
header("Pragma: public");
header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-type: Application/ $file_type");
header("Content-Disposition: attachment; filename=$file_name");
header("Content-Description: Download PHP");
header("Content-Length: $file_size");
header("Content-Transfer-Encoding: binary");
set_time_limit(0);
$fp = fopen($file_path, 'r');
$data = fread($fp, $file_size);
fclose($fp);
echo $data;
?>

In this one, the button to download should contain a link like

http://www.yourdomain.com/downloader.php?file_size=1234&file_type=image/jpg&filename=My_image_title&filepath=foldername/file.jpg
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #10  
Old 10-16-2008, 03:27 AM
Sergeant First Class
 
Join Date: Mar 2008
Posts: 54
Default Re: How can I Build a File Download Script ?

Navaldesign

Thank you for the help, but I am still a little confused on how to use this script:

http://www.yourdomain.com/downloader...rname/file.jpg

Any assistance will be greatly appreciated

Thanks

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #11  
Old 10-16-2008, 07:40 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,052
Default Re: How can I Build a File Download Script ?

Save the script as "downloader.php" using notepad. Upload it on your site, in the same folder where the files you want to allow download for, are.

Then, when you create the links for the downloads, you need to create the link as explained above.

The parametres in the link MUST be specified by you, case per case.
There are some other scripts that will only need to pass with the link, the file path. But, not all server settings allow automatic recognition of the file type and file size. So it is best if for every file, you specify these details yourself.

Example: let's suppose that you have an image file, named my_image.jpg. Being JPG, it's type is image/jpeg Let's also suppose that the file is stored in the directory under the directory where the script is saved, directory name images, and that it has a size of 158689 Bytes. Let's also suppose that you want to send this image to the visitor as "sunset.jpg"

The link from your page to the script, should be:


The link should be:

http://www.yourdomain.com/downloader.php?file_size=158869&file_type=image/jpeg&filename=sunset.jpg&filepath=images/my_image.jpg
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
Pingbacks are On
Refbacks are Off



All times are GMT +1. The time now is 04:34 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2005-2009 VodaHost Web Hosting Your Perfect Web Host - All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203