How to make dynamic URL in Download Button in WordPress?

whois1games

Regular Member
Dec 15, 2018
202
38
Let's say I am using a WordPress site and I offer some downloads. Usually, I upload files in Media Library and directly copied the URL and paste it into the download button.
But some of them are directly using my files URL on their website i.e. Hotlinking
So, how can I make my URL Dynamic?

When someone copies the URL of my Dynamic Link from the Download button to their website, How to redirect to the original post?

THanks
 
I can see that but I want an advanced way for protection that's why I am requesting help.
Thank you
 
I will show an example here https://apkmody .io/games/among-us if you go to this website, there is a download button after each apk and look at the download link, it's different than our WordPress Download link and moreover when you copy the download link and copy anywhere and pasted it then it gets redirected to their official website.
Thanks
 
I will show an example here https://apkmody .io/games/among-us if you go to this website, there is a download button after each apk and look at the download link, it's different than our WordPress Download link and moreover when you copy the download link and copy anywhere and pasted it then it gets redirected to their official website.
Thanks

Maybe a plugin like that is what you are looking for?
https://pixolette.com/wordpress-plugins/wp-one-time-file-download/
 
Their page have a custom cookie set on each download page, and they use their own URL for download. If the cookie does not exist, most likely they use a javascript or back-end language (php etc) function to redirect back to their website, if it exists then the download is proceeded.

Btw, their files look self hosted as far as I can tell. If you host your files somewhere else, anyone can eventually capture the HTTP requests and intercept your files third-party origin and leech that directly.
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock