Protect PDF docs from being directly accessed in URL
问题 I want to protect a pdf file from being directly linked but instead have my logged in users be able to access it. I have a link which currently goes to a javascript function which posts a form: $('nameofdoc').setProperty('value',doc); document.getElementById('sendme').submit(); where sendme is the name of the form and nameof doc the index of the document I want to display. This then goes to a php file: $docpath = $holdingArray[0].$holdingArray[1]; $file = $holdingArray[0]; //file name