FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 30th, 2002, 10:26 PM
Damo Damo is offline
The Never Ending Curve
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Nottingham UK
Posts: 105 Damo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 34 m 6 sec
Reputation Power: 7
Web based FTP link protection

Hi,

I've put some video files on my site that I want to protect from unauthorised access.

The way I link to them from my site is via a FTP link. But what I would like to do is hide the true download FTP URL from the visitor.

The problem with movie files is that web browsers automatically try to open them and stream them straight away, rather than ask if they want to be saved. The link protection scripts I have tried so far are unusable due to when I left click 'save target as' IE will attempt to save the output from the link protection script, rather than the movie file via FTP.

So my questions, Is they a way (via htaccess or some function call) that I can request that the web browser doing the downloading could 'ask' to save the file.

Or does anyone know of a protection script that will allow 'save target as'

Thanks for you help in advance.

Damo

Reply With Quote
  #2  
Old March 30th, 2002, 11:41 PM
MidasZero MidasZero is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 5 MidasZero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to MidasZero
hmmm well you could come up with a scheme to get the file protected but like you said it streams, then only thing i can think of is zipping it so it wont stream, that way it is forced d/l. sorry couldnt' be much more help.

Reply With Quote
  #3  
Old March 31st, 2002, 05:50 AM
korner-drengen korner-drengen is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Location: Denmark
Posts: 3 korner-drengen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to korner-drengen
If you want the user to be prompted to save the data you are sending, such as a generated PDF file, you can use the Content-Disposition header to supply a recommended filename and force the browser to display the save dialog.

PHP Code:
<?php
header
("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=downloaded.pdf");


Note: There is a bug in Microsoft Internet Explorer 4.01 that prevents this from working. There is no workaround. There is also a bug in Microsoft Internet Explorer 5.5 that interferes with this, which can be resolved by upgrading to Service Pack 2 or later.

All abow is copy/past from the manual...

BTW the content type you need to use is image/jpeg

Reply With Quote
  #4  
Old March 31st, 2002, 09:33 AM
Damo Damo is offline
The Never Ending Curve
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Nottingham UK
Posts: 105 Damo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 34 m 6 sec
Reputation Power: 7
I've attempted to use the Content-Disposition headers, and it either tries to save the page that's currently been viewed in html format.

Or the weakness of my PHP coding skills shows through as the script falls to pieces.

PHP Code:
<?php
header
("Content-type: image/jpeg");
header("Content-Disposition: attachment; filename=whatever.avi");


So if I create a link within that bit of php code for file name whatever.avi, it should prompt visitor to save the AVI?

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > Web based FTP link protection


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway