Hello, i need help argently. Can anyone tell me a php script which can download a file if only referred from a certain url? A script which does not work if it is accessed directly and not work if referred from any other URL.
For example i had this www.domain.com and i have a zip file for people to download. And I have a “Download now” button in www.domain.com. For example the zip file was www.domain2.com/thezip.zip. i want a script which makes the zip file download only if a user click the “Download now” button (or any button) from the www.domain.com. And not to download if the user copies and paste it in the browser or a downloading software.
So its something like this. www.domail.com has a button which say maybe “Download Now” and when the user clicks that button it sends the user this scripts maybe www.domain2.com/thescript.php and this script checks if the user is being send from www.domain.com or not. If the user is being send by www.domain.com the script lets the user to download a file. If not, maybe the page dies or something.