Tried like that's
<?php
{{if member.member_id AND member.inGroup('4')}}
$finalfilepath = ('/home/hey/noino/3456342.exe');
function random_name($len)
{
$output = "";
$random = "sdgrtehrth";
for( $i = 0; $i < $len; $i++ )
{
@$output .= $random[rand(0, strlen($random))];
}
return $output;
}
//PROVIDE THE DOWNLOAD
header('Content-Description: File Transfer');
header('Content-Type: application/exe');
header('Content-Disposition: inline; filename="' . random_name(rand(1, 4)) . '.exe"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($finalfilepath));
header('Accept-Ranges: bytes');
fpassthru(fopen($finalfilepath,"rb"));
?>
Doesn't seem to work it returns a HTTP ERROR 500
but it works fine without the code u gave to me so what could be the issue