-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfetch.php
More file actions
executable file
·59 lines (43 loc) · 1.18 KB
/
fetch.php
File metadata and controls
executable file
·59 lines (43 loc) · 1.18 KB
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
<html>
<title>JumpStart</title>
<style>
body{background-color: ; width: 100%}
html{width: 100%}
td{text-align: right; background-color: ; border-left:solid 75px transparent}
th{background-color: ;}
table{border-collapse: separate; margin: 0 auto; margin-top: 13%; border-spacing: 10px;}
input.hide{visibility: hidden}
*{font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif}
</style>
<body background="bkgrd.png">
<?php
$choices = $_GET;
$i = 0;
$myfile = fopen("testFile.txt", "w") or die("Unable to open file!");
foreach ($choices as $index=>$val)
{
fwrite($myfile, $index);
fwrite($myfile, "\n");
}
fclose($myfile);
print "<prev>";
print_r($choices);
print "</prev>";
$file = 'testFile.txt';
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>
</body>
</html>