title: Hide download URL
body: <p>I'm trying to make the URL of a downloadable PDF document invisible to the user, so that they can't access it from anywhere else. I need to hide the URL from the bottom left of the page (when they mouse over) and the URL from the browser's address bar when they open it. I need it to work on all browsers.</p>
  
  <p>My HTML looks like this: </p>
  
  <pre><code>&lt;a href="http://www.example.com/files/pdf/a34501.pdf"&gt;View PDF&lt;/a&gt;
  </code></pre>
  
  <p>And the link should look like this:</p>
  
  <p><a href="http://www.example.com/files/pdf/a34501.pdf" rel="nofollow">View PDF</a></p>
  
  <p>The reason is the user must provide a code to be able to download their document, but if they can see the URL they could easily download someone else's documents (They only have to change a digit in the "a34501.pdf" part).</p>
  
  <p>I read something about using a JavaScript function to encrypt the URL, or use an external PHP file. However, I don't know how to do that.</p>
  
  <p>Thanks.</p>