I have a difficulty, I made a system that frees file download for each specific user, this check is done by the user code logged in and month and year filters that the user fills, so necessarily the person has to be logged in to but I do not want to use this link to download the file again and this is what I did not want, I would like this link to be hidden, is there any way to do that?
<?php
$pasta = '/arquivos';
$arquivos = "$user->cod_func".' '.utf8_decode($_POST['select_mes']).' de '.$_POST['select_ano'].'.pdf';
$filename = 'arquivos/'.$arquivos;
if (file_exists($filename)) {
?>
Download do Arquivo: <a href="?action=download&file=<?php echo base64_encode("$pasta/$arquivos"); ?>"><?php echo $_POST['select_mes'].' '.$_POST['select_ano']; ?></a>
<br>
Vizualizar: <a href="?action=embed&file=<?php echo base64_encode("$pasta/$arquivos"); ?>"><?php echo $_POST['select_mes'].' '.$_POST['select_ano']; ?></a>
<br>
<?php
} else {
echo "Não existe holerith no mês selecionado";
}
?>