PHP program authorization verification development ideas _ PHP Tutorial

Source: Internet
Author: User
PHP program authorization verification development ideas. It is important to implement a set of commercial procedures. for example, if only a client can be used for one server, authorization verification is very important. The following is my idea: configure the php environment of the server and make a set of commercial programs in the program. for example, if only a sufficient number of customers can only use one server, authorization verification is very important. The following is my idea: apply the php environment configuration of the server to the program, generate a license string, and write the string to the license file code. Even if the program is not moved to another server, the program cannot run. I hope you will discuss more ......



/**
* BkJia Chinese forum @ authorization string
*/
Function authorization ($ seed = ){
$ Encode = $ _ SERVER [SERVER_SOFTWARE]. $ _ SERVER [SERVER_NAME]. $ _ SERVER [DOCUMENT_ROOT].
$ _ SERVER [SERVER_ADMIN]. $ _ SERVER [SERVER_ADDR]. PHP_VERSION. PHP_ OS. _ FILE __;
Return md5 ($ encode );
}

$ Authorization_key = 2cto.com;
Echo authorization ($ authorization_key); // here the string verification is generated
$ Authorization_check = array (dd670852938815f3892d3c511cc8fceb, ddc976cc02bce5c3c22c4d7d201c0cae); // The authorization string copies the generated character verification here.

If (! In_array (authorization ($ authorization_key), $ authorization_check )){
Die (sorry, your program has not been authorized by bkJia !!);
}

Bytes. The following is my idea to apply the php environment configuration of the server to the program...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.