Kullanıcılar / webroot / files / bigimage.jpg indirmek istiyorsanız Örneğin, bir URL www.domain.com/download.php?filename=bigimage.jpg verilir. Daha sonra,
- How to prevent unauthenticated users to access the file bigimage.jpg?
- If an authenticated user visits that URL, I want to trigger the download behavior of browsers (e.g., in IE, show the dialog with "Open", "Save" and "Cancel" buttons) instead of displaying the image in browsers. How to do this?
EDIT: Make the question more clearer.
Ben LAMP yığınını kullanıyorum. Q1 için, ben kullanıcıların doğrudan dosyaya erişmek önlemek için nasıl soruyorum, kimlik doğrulaması yapmak için nasıl soran değilim. Ayrıca, tüm dosya içeriğini okuma ve yankı onlara kaynak kapsamlıdır. Daha iyi bir çözüm var mı?