比如我现在做一款 PHP 项目的第三方插件,用户需要到某平台付费后下载使用。
用户的使用环境可能是无法访问外网的
这样的情况下有什么思路是可以解决 “避免一个用户付费下载后所有用户都能复制使用” 的问题?
如果有过相关的经验,希望可以提供个思路
现在的情况就是用户毫不排斥我们会对服务器推送消息,并且乐于使用我们产品,以及使用相关插件。源码也是加密的。需要考虑的是如何保护付费插件的开发者利益
追加:
可能我没说清楚,插件使用者不是开发者,只是单纯的用户。源码加密那是肯定会做的,但是即使你源码加密也不影响这个插件在应用中正常使用不是么?就像是单机游戏一人破解万人使用,使用者不用管你源码怎样,反正我拿到能用就是了。要处理的是这种情况
回复内容:
比如我现在做一款 PHP 项目的第三方插件,用户需要到某平台付费后下载使用。
用户的使用环境可能是无法访问外网的
这样的情况下有什么思路是可以解决 “避免一个用户付费下载后所有用户都能复制使用” 的问题?
如果有过相关的经验,希望可以提供个思路
现在的情况就是用户毫不排斥我们会对服务器推送消息,并且乐于使用我们产品,以及使用相关插件。源码也是加密的。需要考虑的是如何保护付费插件的开发者利益
追加:
可能我没说清楚,插件使用者不是开发者,只是单纯的用户。源码加密那是肯定会做的,但是即使你源码加密也不影响这个插件在应用中正常使用不是么?就像是单机游戏一人破解万人使用,使用者不用管你源码怎样,反正我拿到能用就是了。要处理的是这种情况
加密方法:把php文件都编译了就可以
授权方法:内部做一个验证方式,每个付费客户会拿到一个key/sn,使用时需要输入这个key
验证方法:简单办法可以根据被访问的地址或域名检测,一个key对应一个地址
难点就在于内部的验证方式,key→(你的私有加密算法)→用户将要被访问的地址;
另外后期维护起来可能有些麻烦。可能你还要一个万能key用于用户开发阶段的使用。剩下的设计你就自己考虑吧。
真逗,就算用户使用的环境是可以访问外网的你就能防止了吗?你的代码是开源的好不好?如果你植入了识别语句会被找出来并删掉,而且,如果你的插件会主动向特定的服务器推送信息,谁敢用?核心数据被你偷了怎么办?也不用特别考虑加密,基本上插件不会100%符合要求,所以一些微调是必然的,所以加密过的插件不会有人买。
这个事儿还是完全靠自觉,实际上性价比很好的话大家是乐于付费的,几十几百块钱的东西谁会这么纠结,再说这个钱又不是程序员自己出,你会问老板“咱们话500块钱买一份还是用盗版的呢?”还是会告诉老板“咱们要用这个,500一份,给批个条”?前者老板会不会腹诽你觉得老板的面子不值500块?
最后,亲,我觉得盗版不是问题,而是免费都没人乐意用才是问题。
当然,你如果做的是PHP底层插件编译的mo或者dll的话当我什么都没说过。
针对修改后的问题
你们的产品是加密的,那插件源码也加密,付款买激活码,然后搞个在线激活,后期运行不需要联网。
phar zend or dll 混淆,
源码加密了 是不是就可以做授权什么了,获取相关信息做序列号。 被破解了 那就GG了
这个Windows都没做到,目前貌似没有完善的解决方案
楼主如果你这个付费300,我个人猜测如果销量好,会有开发个只要50的插件,所以还是建议
免费,开源 实在不行义务捐赠也行
zend guard~
核心功能用 Python,golang,c 或其他语言写,并编译成可执行文件供 php 调用.
验证机制就放到里面,这样就增加了破解难度
PHP7中可以用opcache.file_cache导出脚本opcode一定程度上保护源代码并提升运行效率.
其实有时自己稍微用php_strip_whitespace/gzcompress/base64_encode混淆下,用eval/base64_decode/gzuncompress运行,防防君子还是可以的.
mzphp :第一款支持 scss 语法、 css sprite 、以及 EnPHP 混淆加密的 php 框架,支持PHP7:
https://git.oschina.net/mz/mzphp2

ThesecrettokeepingaPHP-poweredwebsiterunningsmoothlyunderheavyloadinvolvesseveralkeystrategies:1)ImplementopcodecachingwithOPcachetoreducescriptexecutiontime,2)UsedatabasequerycachingwithRedistolessendatabaseload,3)LeverageCDNslikeCloudflareforservin

You should care about DependencyInjection(DI) because it makes your code clearer and easier to maintain. 1) DI makes it more modular by decoupling classes, 2) improves the convenience of testing and code flexibility, 3) Use DI containers to manage complex dependencies, but pay attention to performance impact and circular dependencies, 4) The best practice is to rely on abstract interfaces to achieve loose coupling.

Yes,optimizingaPHPapplicationispossibleandessential.1)ImplementcachingusingAPCutoreducedatabaseload.2)Optimizedatabaseswithindexing,efficientqueries,andconnectionpooling.3)Enhancecodewithbuilt-infunctions,avoidingglobalvariables,andusingopcodecaching

ThekeystrategiestosignificantlyboostPHPapplicationperformanceare:1)UseopcodecachinglikeOPcachetoreduceexecutiontime,2)Optimizedatabaseinteractionswithpreparedstatementsandproperindexing,3)ConfigurewebserverslikeNginxwithPHP-FPMforbetterperformance,4)

APHPDependencyInjectionContainerisatoolthatmanagesclassdependencies,enhancingcodemodularity,testability,andmaintainability.Itactsasacentralhubforcreatingandinjectingdependencies,thusreducingtightcouplingandeasingunittesting.

Select DependencyInjection (DI) for large applications, ServiceLocator is suitable for small projects or prototypes. 1) DI improves the testability and modularity of the code through constructor injection. 2) ServiceLocator obtains services through center registration, which is convenient but may lead to an increase in code coupling.

PHPapplicationscanbeoptimizedforspeedandefficiencyby:1)enablingopcacheinphp.ini,2)usingpreparedstatementswithPDOfordatabasequeries,3)replacingloopswitharray_filterandarray_mapfordataprocessing,4)configuringNginxasareverseproxy,5)implementingcachingwi

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Chinese version
Chinese version, very easy to use
