clockwerk-www – Diff between revs 1 and 44
?pathlinks?
Rev 1 | Rev 44 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | <?php |
1 | <?php |
|
Line -... | Line 2... | |||
- | 2 | |
||
- | 3 | /////////////////////////////////////////////////////////////////////////// |
||
- | 4 | // Copyright (C) Wizardry and Steamworks 2014 - License: MIT // |
||
- | 5 | /////////////////////////////////////////////////////////////////////////// |
||
2 | |
6 | |
|
3 | require_once 'lib/recaptchalib.php'; |
7 | require_once 'lib/recaptchalib.php'; |
|
Line 4... | Line 8... | |||
4 | require_once 'lib/wasRemoteAdmin.php'; |
8 | require_once 'lib/wasRemoteAdmin.php'; |
|
Line 24... | Line 28... | |||
24 | exit; |
28 | exit; |
|
25 | } |
29 | } |
|
26 | } |
30 | } |
|
27 | $iar_path = '/var/lib/iar/'.$first.'_'.$last.'/'.$first.'_'.$last.'.iar'; |
31 | $iar_path = '/var/lib/iar/'.$first.'_'.$last.'/'.$first.'_'.$last.'.iar'; |
|
28 | if(file_exists($iar_path)) { |
32 | if (file_exists($iar_path)) { |
|
29 | if(false !== ($handler = fopen($iar_path, 'r'))) { |
- | ||
30 | header('Content-Description: File Transfer'); |
33 | header('Content-Description: File Transfer'); |
|
31 | header('Content-Type: application/x-gzip-compressed'); |
34 | header('Content-Type: application/x-gzip-compressed'); |
|
32 | header('Content-Disposition: attachment; filename='.basename($iar_path)); |
35 | header('Content-Disposition: attachment; filename='.basename($iar_path)); |
|
33 | header('Content-Transfer-Encoding: binary'); |
36 | header('Content-Transfer-Encoding: binary'); |
|
34 | header('Expires: 0'); |
37 | header('Expires: 0'); |
|
35 | header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
38 | header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
|
36 | header('Pragma: public'); |
39 | header('Pragma: public'); |
|
37 | header('Content-Length: '.filesize($iar_path)); |
40 | header('Content-Length: '.filesize($iar_path)); |
|
38 | |
- | ||
39 | while(false !== ($chunk = fread($handler, 4096))) { |
- | ||
40 | echo $chunk; |
41 | readfile($iar_path); |
|
41 | } |
- | ||
42 | } |
- | ||
43 | exit; |
42 | exit; |
|
44 | } |
43 | } |
|
45 | } |
44 | } |
|
Line 46... | Line 45... | |||
46 | |
45 | |