How to do PHP encryption authorization and packaging?
怪我咯
怪我咯 2017-05-19 10:08:32
0
5
853

Recent project needs to make such a project requirement. Writing PHP has never been involved before. Please give me some advice:

  1. Is it possible to package php into an installation package for one-click installation (windows environment)

  2. Code encryption recommendation

  3. How to authorize?

To put it bluntly, I actually want to make a commercial software for an organization, but I don’t want it to be copied to other branches for use.

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all (5)
给我你的怀抱

1. About PHP packaging

It’s no problem to package the PHP interpreter and PHP project into an installation package. I even packaged the PHP interpreter and ran it on an Android phone without any problem. Because PHP officially provides a Windows version of the binary package, I can even compile it myself This step is saved. In order to streamline the PHP interpreter, you can delete all the extensions you don’t need, such as the intl extension and its dependent ICU. After the reduction, the packaged interpreter is estimated to be less than 5 MB. Because PHP has built-in HTTP server and SQLite database, so the client no longer relies on Apache and MySQL, and can run PHP projects directly, and it also saves resources.

2. About PHP code protection

PHP7’s opcache supports usingopcache.file_cacheto export binary opcodes corresponding to PHP scripts. These opcodes are related to the operating system and PHP interpreter version and can play a certain role in code protection. In addition, Zend Guard and ionCube also provide paid PHP code encryption service.

3.Authorization

For example, it can be judged in the encrypted PHP code$_SERVER['SERVER_NAME']. If it is not the domain name bound during authorization, the service will be directly refused.

    世界只因有你

    There seems to be no good code-level encryption, zend guard can encrypt the code. .
    The other is to use extensions, which means you must have your extension to run. The management system of wdlinux adopts this method

      世界只因有你
      不好意思,没注意看清楚。软件绑定机器,只能把mac地址写入到项目里面。验证部分通过加密来隐藏验证方式。
        淡淡烟草味

        For encryption, you can try this: EnPHP encryption obfuscation

        About packaging, directly compress the php exe and script into a directory and call it as a bat script

        As for usage restrictions, you can generally judge based on HTTP_HOST ENV

          淡淡烟草味

          You can encrypt the php source code as shown in the screenshot. If necessary, please +2795934612

            Latest Downloads
            More>
            Web Effects
            Website Source Code
            Website Materials
            Front End Template
            About us Disclaimer Sitemap
            php.cn:Public welfare online PHP training,Help PHP learners grow quickly!