如何保护将模板锁定到 URL
我正在构建一个必须为某个域 URL 独占的 Costum wp 主题,我想要做的是将主题锁定在那里,这该怎么办?我正在考虑在包含 footer.php 之前使用 PHP 检查 URL,并将这部分代码写入,您觉得怎么样?有更简单的方法吗?
那需要什么?查看服务器变量请求?我想我可以用谷歌搜索一下,您对逻辑/算法的意见将非常感激。
警告,我不是高级编码员。
I'm building a costum wp theme that must be exclusive for a domain URL, what I want to do is lock the theme there, how can this be done ? I was thinking using PHP to check for the URL before including, lets say, the footer.php, and have that part of the code incripted, what do you think? is there a easier way?
What would that require? Looking at the server vars request? I guess I can google that, your opinion on the logic/algorithm would be very appreciated.
Warning, I'm not an advance coder.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于它是 PHP 且开源,所以您不能。即使您这样做,也可以编辑源代码并消除限制。
您能做的最好的事情就是使用许可证文件加密部分源代码。但即使这样,这也会使主题的某些部分无法更改,并且基本功能可以跳过许可证检查。死胡同。
我建议您看一下商业模板,以及主题制作者用来使其盈利的商业模式。
您可以找到更多信息,与其他开发人员一起学习,尝试 http://themeforest.net/
Since it´s PHP and open source, you can´t. And even if you do, it´s possible to edit the source and remove the limitations.
The best thing you can do is to encrypt a part of source code with a license file. But even that way, this will make some parts of your theme impossible to change, and the base funcionality can skip the license check. A dead end.
I recommend you to take a look at a commercial template, andthe business model theme makers use to make it profitable.
You can find more, learning with other developers, try http://themeforest.net/