PHP - 保护代码

发布于 2024-09-08 12:14:42 字数 424 浏览 8 评论 0原文

可能的重复:
如何保护您的软件代码?
保护我的 PHP 应用程序

嗨,我有一个框架,我希望能够出售许可证为了。我希望人们能够(在一定程度上)编辑代码,但我也想尝试阻止有人为代码付费然后将其提供下载。

有没有一种方法可以将部分代码(一小段代码)保留在服务器上,使用我的框架的每个站点都需要连接才能使用?

非常感谢任何帮助或想法。

Possible Duplicates:
How to protect your software code?
Protect my PHP App

Hi, I have a framework that I am wanting to be able to sell licenses for. I want people to be able to edit the code if they choose to (to a degree) but also I want to try and stop someone paying for the code and then just putting it up for download.

Is there a way that I can keep part of the code ( small piece of code that is ) on a server which each site using my framework will need to connect to use?

any help or ideas much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

提笔书几行 2024-09-15 12:14:42

你可以...但是你愿意吗?

PHP 脚本不是 Java servlet。他们并不总是在奔跑;它们在请求开始时开始,在请求停止时结束。

那么,您会放置哪些需要打电话回家的功能呢?它不能出现在每个页面中,因为它会显着减慢客户端应用程序和服务器的速度。如果您有一些很少使用的页面(例如某些配置页面),您可以将其某些功能推迟到您的服务器。但即便如此,请考虑您的客户端可能不想运行依赖于您的某些服务器的代码 - 您可能无法保证它始终在线;客户端的服务器可能位于防火墙后面,不允许传出连接等。

You can... But do you want to?

PHP scripts are not Java servlets. They're not always running; they start when a request commences and they finish when the request stops.

So, which functionality would you put that requires calling home? It must not be in every page, because it would significantly slow down both the client application and your servers. If you have some page that is rarely used (e.g. some configuration page) you could defer some of its functionality to your server. But even then, consider that your client may not want to run code that depends on some server of yours – you may not be able to guarantee it's always online; the client may have its server behind a firewall that doesn't allow outgoing connections, etc.

如若梦似彩虹 2024-09-15 12:14:42

Zend Guard 似乎是事实上的标准。不过,快速 Google 搜索 显示了其他一些内容:

然而,从长远来看,所有这些最终都会激怒那些必须对其进行修改的人服务器来运行脚本。我的建议是,作为一个使用并发布过这种类型加密脚本的人,你不必费心,因为无论如何都会有人(只要有足够的时间)解密它。

Zend Guard seems to be the de facto standard. However, a quick google search revealed a couple others:

In the long run, though, all of these just end up pissing off the people who have to make modifications to their server to run a script. My advice, as someone who has both used and released scripts with this type of encryption, is that you not bother, because someone will (given enough time) decrypt it anyways.

〃温暖了心ぐ 2024-09-15 12:14:42

这就是脚本语言的问题。您无法以用户看不到的方式保护代码。但是,如果您计划提供许可证并且客户必须购买它,那么我认为这是最好的方式。如果他将代码上传给其他人下载,你可以去找你的律师。

您提到的每个人都必须连接到您的服务器的方式也是一种解决方案。但因此我不会将框架存储在您的服务器上,而是将框架提供给您的客户,并让他为一个域注册该框架。然后框架连接到您的服务器并检查是否从正确的域调用它。

抱歉,我的英语不太好表达自己,但我希望你明白:)

That's the problem with script-languages. You can't protect the code in the way, that a user doesn't see it. However if you plan to provide a license and a customer has to buy it, that's the best way I think. If he would upload the code for others to download, you can go to your lawyer.

The way you mentioned, that everybody has to connect to your server is also a solution. But therefore I would not store the framework on your server, but give the framework to you customer and let him register this framework for one domain for example. Then the framework connects to your server and checks if it was called, from the correct domain.

Sorry, my english it not that good to express myself this good, but I hope you get the idea :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文