filename
This commit is contained in:
parent
0d56163339
commit
b02c89973c
9
rdp.php
9
rdp.php
@ -1,10 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$host = filter_input(INPUT_GET, 'v', FILTER_VALIDATE_DOMAIN) ?: filter_input(INPUT_GET, 'v', FILTER_VALIDATE_IP);
|
$host = filter_input(INPUT_GET, 'v', FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) ?: filter_input(INPUT_GET, 'v', FILTER_VALIDATE_IP);
|
||||||
if (!$host) {
|
if (!$host) {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-Disposition: attachment; filename='.str_replace(':', '_', $host).'.rdp');
|
$port = filter_input(INPUT_GET, 'p', FILTER_VALIDATE_INT);
|
||||||
|
if ($port) {
|
||||||
|
$host = "$host:$port";
|
||||||
|
}
|
||||||
|
|
||||||
|
header("Content-Disposition: attachment; filename=$host.rdp");
|
||||||
header('Content-Type: application/rdp');
|
header('Content-Type: application/rdp');
|
||||||
echo "full address:s:$host\n";
|
echo "full address:s:$host\n";
|
||||||
|
Reference in New Issue
Block a user