PHP Creating a unique identifier based on server hardware / operating environments / environments?

Is it possible to create a unique identifier based on the server hardware / OS? I want to create license keys for my PHP web application based on the client server, as Atlassian JIRA does.

Thanks for your help.

+4
source share
2 answers

You can try to read a few $_SERVER / $_ENV and combine them with a string. After that md5 this line and you will get a license key.

You must be careful which variables to choose if you do not want your clients to receive a new license key each time they upgrade their servers. Also, not all variables are available for all system configurations.

+3
source

I think the best way is to code the EXE in any other language that receives the HWID from the server, and then have your PHP script exec () EXE, if the result from the EXE matches, then you run the script ... If not, you will see a message about the error.

You might want to use blenc_encrypt () in PHP, at least so that you can prevent users from logging in and change "if (systemhwid == validhwid)" to "if (1 == 1)"

The best option for encryption is to use IonCube (I think this is Ioncube, which encrypts PHP files), but unfortunately it costs a lot of money.

PHP.net search for blenc_encrypt () function

For those who avoid questions by saying things like “the web server is not designed for this” or “you don’t need to check the HWID on the servers”, JUST ANSWER QUESTION! Not just saying that this is impossible, because my answer proves that it is possible ... You just need to think outside the box and you need to think a little. Also, don't question the user's intentions, they just want a direct answer, no BS.

0
source

Source: https://habr.com/ru/post/1401967/


All Articles