473,386 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Download Link

A client needs to have download links sent to customers automatically after purchases. The links must expire after three days. I would prefer not to have the files be stored in a static location that is publicly accessible. I am wondering if there is any good way of having the permissions on a file be dynamically changing without constantly having scripts update .htaccess files. The other way I had been thinking about doing this would be to have the files to be downloaded be stored above the public_html folder but then somehow link to the files when an authorized user needs to download them. Any help on this matter would be greatly appreciated.
Feb 24 '09 #1
4 1809
I was doing some more thinking about this and was wondering if it would be feasible to make a perl script that printed a binary file(zip file probably)... Any thoughts?
Mar 4 '09 #2
Niheel
2,460 Expert Mod 2GB
Use a php script to control downloading. You can then interface with a database to check how long the download should be available for download and what file the customer has access to.
Mar 4 '09 #3
That was my initial thought, but I don't want users to be able to find out where the actual file is stored. If I just point to a static file location they could look at that and share it with whomever, not to mention that they could then get around the three day limit.
Mar 4 '09 #4
Markus
6,050 Expert 4TB
@mastahyeti
Not if you have the file outside of the root folder. If your directory setup is server/domain/htdocs/, putting the file in the /domain/ directory means anyone browsing your site does not have access to it. You can then use a php file to read the file (readfile()) and force a download - after checking the user has permissions, etc.
Mar 5 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: timbratureman | last post by:
I have a txt file in my server. I have to provide to the user 2 links. One link is to download the file and the other one is to display it inside the browser. Is it possible? I made <a...
3
by: Michael | last post by:
I am trying to allow a user to view a PDF in a new window. I currently have this working using the following: <a href="./pdf.do?parameter=01121980" target="top"><b>pdf</b></a> The problem...
14
by: Aaron | last post by:
On my website I have a dynamic link(aspx) to this file 0AX120S.jpg(privacy protection). When a visitor clicks on the link I want them to see my_vacation_pic.jpg (fetch realname from database) is...
0
by: Sarah Akers | last post by:
GgF ----gL5cJ72EqiGIQ0SK65Rz Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html> <head> <style type=3D"text/css">.eyebrow { FONT-WEIGHT: bold; FONT-SIZE: 10px; TE=
0
by: Anne Snow | last post by:
7qs ----bSCMEc0pLIbJxmV9 Content-Type: text/html; Content-Transfer-Encoding: quoted-printable <html><head><style type=3Dtext/css>.eyebrow { FONT-WEIGHT: bold; FONT-SIZE= : 10px;...
0
by: Buddy Ackerman | last post by:
I am trying to implment a file download via a link such that when clicked, instead of starting the default application for that type of file the user will be presented with a download dialog...
0
by: kain razial | last post by:
ANYOTHER NEEDS ALSO CONTACT ME.I WILL HELP YOU TO GET THAT TEKLA XSTEEL V 12 DOWNLOAD LINK. http://www.sendspace.com/file/zem32r
0
by: kain razial | last post by:
ANYOTHER NEEDS ALSO CONTACT ME.I WILL HELP YOU TO GET THAT TEKLA XSTEEL V 12 DOWNLOAD LINK. http://www.sendspace.com/file/zem32r
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
6
mageswar005
by: mageswar005 | last post by:
Hello Guys, I want to Avoid the Save option when i click the download link in php . I just want open and cancel option only, i dont want save option when i click the download link in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.