PHP如何防止下载地址被盗? [英] How to protect download URLs to be stolen with PHP?

查看:28
本文介绍了PHP如何防止下载地址被盗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器上链接并托管了多个程序.我需要保护 URL 不被盗取并放置在其他网站上,因为它们会占用我的带宽.

I have several programs linked and hosted on my server. I need to protect the URLs from being stolen and placed on other sites because they'll use my bandwidth.

我怎样才能在 PHP 中做到这一点?

How can I do that in PHP?

我应该检查推荐人还是做其他事情?

Should I just check referrer or do something else?

推荐答案

如果您不想下载/窃取它们,请不要将它们放在您的网站上.

If you don't want them downloaded/stolen, then don't put them on your site.

从好的方面来说,如果它们被盗,那么您的带宽只会被使用一次.检查referer最容易,也最容易绕过/颠覆.

On the plus side, if they are stolen, then your bandwidth will only get used once. Checking referer is easiest to do, and also easiest to bypass/subvert.

这篇关于PHP如何防止下载地址被盗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆