For Linux, use tar. xz to package the php7cli (3 MB) compiled by GCC-O3 and the dependent Library php7libs (7 MB) with a size of about 10 MB.
Because the dependency Library is packaged, it can be decompressed and ready for use. it is applicable to all Linux distributions.
The entire application can be packaged up to 15 MB.
If you do not want to see the source code, you can use tools such as php-beast for encryption.
I packaged PHP7 for 64-bit Linux:
Remove the PHP-FPM and PHP-CGI inside, keep php cli, the entire PHP7 environment is about 10 MB.
Assume that the application is installed in/opt/phppc, and the www under it is used as the root directory to start the HTTP service:
Php-S localhost-t/opt/phppc/www
Access localhost to open the application.
For example, PHP calls the system's built-in command lshw or reads/proc/cpuinfo to get various hardware information, including the real-time CPU running frequency.
PHP can directly write the information returned by the command
Or convert it to an array for exact hash operation and then output.
In this way, like the probe, you can get hardware information like CPU-Z tools on Windows through the Web interface.
SQLite is used for local storage, and AJAX or WebSocket (Swoole) can be used for browser interaction with local and server ),
When the program is updated, pclose (popen ('Upgrade. php', 'r') opens a CLI process and obtains the update package using file_get_contents () or curl.
Processes can communicate with each other through the file system Mark or SQLite database.