许可和保护 php 脚本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1157425/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
license and protect php script
提问by respectTheCode
I am interested to use http://www.phplicengine.comto protect my php code and license my php script but have no clue how good it is. is here a PHPLicengine user who may help me please?
我有兴趣使用http://www.phplicengine.com来保护我的 php 代码和许可我的 php 脚本,但不知道它有多好。请问这里有可以帮助我的 PHPLicengine 用户吗?
回答by Tyler Carter
PHP code cannot be encrypted because at some point you have to eval() the string that will be producing the output.So there isn't a way to actually keep people from stealing your code if you let it get off your servers.
PHP 代码无法加密,因为在某些时候您必须 eval() 将产生输出的字符串。因此,如果您让它离开您的服务器,则没有办法真正阻止人们窃取您的代码。
For the most part, trying to protect the code is useless. People make money off of code by either A) Working for someone, B) Providing updates/support to only valid paying customers, or C) Somehow make the data the software uses go through their own servers to get to the client.
在大多数情况下,试图保护代码是没有用的。人们通过 A) 为某人工作,B) 仅向有效的付费客户提供更新/支持,或 C) 以某种方式使软件使用的数据通过他们自己的服务器到达客户端,从而从代码中赚钱。
Any other attempt to protect the code requires legal counsel and action.
任何其他保护守则的尝试都需要法律顾问和行动。
回答by BlackAura
By itself, a system like PHPLicengine is useless. Your PHP script will still be a plain text PHP script, so someone can just strip the license code out (it'll take 1/10th as long as it took you to integrate), and do whatever they like with it.
就其本身而言,像 PHPLicengine 这样的系统是无用的。您的 PHP 脚本仍将是纯文本 PHP 脚本,因此有人可以删除许可证代码(只要您进行集成,它就需要 1/10),并随心所欲地使用它。
PHP script encoders (like IonCube, Zend Encoder) have the ability to pre-compile PHP scripts into bytecode. They require the web server to have a PHP extension to decode and run the compiled scripts.
PHP 脚本编码器(如 IonCube、Zend Encoder)能够将 PHP 脚本预编译为字节码。它们要求 Web 服务器具有 PHP 扩展来解码和运行已编译的脚本。
They basically do the same thing as obfuscators in Java / .NET - create an obfuscated binary version that still runs, but is more difficult to decompile or modify.
它们基本上与 Java / .NET 中的混淆器做同样的事情——创建一个仍然运行的混淆二进制版本,但更难反编译或修改。
There are problems with this approach - not all web hosts have the appropriate PHP extension installed, and each script encoder needs it's own. Even those that do will typically have only one (IonCube and Zend are the most common). Typically, your customers won't be able to install the appropriate PHP extension, since they don't own or control their web server, so only having an obfuscated version available might prevent some customers from using (and therefore buying) your software.
这种方法存在问题 - 并非所有 Web 主机都安装了适当的 PHP 扩展,并且每个脚本编码器都需要它自己的。即使是那些通常只有一个(IonCube 和 Zend 是最常见的)。通常,您的客户将无法安装适当的 PHP 扩展,因为他们不拥有或控制他们的 Web 服务器,因此仅提供混淆版本可能会阻止某些客户使用(并因此购买)您的软件。
Judging from the FAQs on the PHPLicengine website, the licensing portions of their license system are encoding using IonCube anyway, so that pretty much forces you into using IonCube.
从 PHPLicengine 网站上的常见问题来看,他们的许可系统的许可部分无论如何都是使用 IonCube 进行编码的,因此这几乎迫使您使用 IonCube。
回答by respectTheCode
You can compile php code. It is not a simple process though. Take a look at Bcompiler or byte compiler on the php.net site.
你可以编译php代码。但这不是一个简单的过程。在 php.net 站点上查看 Bcompiler 或字节编译器。
回答by Savan Paun
i suggest You can use cronfor check license every hour if system found fake licence key plugin for code destroyed. but if you sale your plugin to 20000 user there are difficult to handle it...
我建议如果系统发现代码被破坏的假许可证密钥插件,您可以每小时使用cron来检查许可证。但是如果你把你的插件卖给 20000 个用户,那就很难处理了......
回答by Richy B.
I've never heard of PHPLicengine - for encryption/protection, I normally rely on either Zend Guardor ionCube. I've also heard good things about PHPAudit.
我从未听说过 PHPLicengine - 对于加密/保护,我通常依赖Zend Guard或ionCube。我也听说过有关PHPAudit 的好消息。
However, whilst these (especially Zend) are all "big names" in the PHP script protection business, they cannot protect your script against really serious crackers (I know both Zend and IonCube have been broken before: however, this was several versions ago and the resulting output was obfuscated anyway as both systems, for speed, reduced variables/function names to minimal length and removed comments).
然而,虽然这些(尤其是 Zend)在 PHP 脚本保护业务中都是“大牌”,但它们无法保护您的脚本免受真正严重的破解者的侵害(我知道 Zend 和 IonCube 以前都被破坏过:但是,这是几个版本之前的无论如何,由于两个系统都对结果输出进行了混淆,为了速度,将变量/函数名称减少到最小长度并删除注释)。
回答by Benjamin
回答by Andy
Hi all you can try with them to encrypt with license key your php code/source/script
大家好,您可以尝试与他们一起使用许可证密钥加密您的 php 代码/源代码/脚本
I have found on internet this service you can try it is cheap
我在互联网上找到了这项服务,您可以尝试一下,它很便宜
https://www.facebook.com/pages/Encrypt-with-License-Key-any-PHP-Code/1408496709369712
https://www.facebook.com/pages/Encrypt-with-License-Key-any-PHP-Code/1408496709369712

