forked from joshpangell/single-use
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.php
30 lines (24 loc) · 1.1 KB
/
variables.php
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
<?
/**
* Single use download variables
* Defines where the actual download location is
* Defines the path to the download file (download.php)
* Sets a fake files name to show to users (should not be the same name as the real file)
* Sets the admin password to generate a new download link
* Sets a date when the file will expire (examples: +1 year, +5 days, +13 hours)
*/
// The actual file (path starts from this directory forward)
define('PROTECTED_DOWNLOAD','secret/friday.zip');
// The path to the download.php file (probably same dir as this file)
define('DOWNLOAD_PATH','/singleuse/download.php');
// What the file will be displayed to users as
define('SUGGESTED_FILENAME','best-song-evar.zip');
// The admin password to generate a new download link
define('ADMIN_PASSWORD','1234');
// The expiration date of the link (examples: +1 year, +5 days, +13 hours)
define('EXPIRATION_DATE', '+1 month');
// Don't worry about this
define('CONTENT_TYPE','application/zip');
header("Cache-Control: no-cache, must-revalidate");
header("Expires: ".date('U', strtotime(EXPIRATION_DATE)));
?>