plug-in unit Name: Domain Name Authorization System plug-in
Plug in author: TOYEAN
Plug in language: PHP
Applicable version: Z-Blog 1.5
Issued on: September 29, 2016
Updated on: March 1, 2017
Latest version: V1.1
Publishing address: https://www.toyean.com/post/allowurl.html
Download address:
You need to have a Tuoyuan account, and Sign in Then you can view or download the hidden content
Plug in interface (basic settings):

Plug in interface (authorization management):

The Domain Name Authorization System plug-in is applicable to zblog Application developer, belonging to Tuoyuan Network The first independent plug-in of Z-blog login interface plug-in (LoginUI) is the login plug-in zblogdl for modifying the self coating version.
The Domain Name Authorization System plug-in is an extension of the previous article《 Two Methods of Domain Name Authorization in PHP 》Convenient management of encapsulation can realize theme When enabling and uninstalling, verify the authorization of the domain name through the server. The published version can only manage the authorization of the domain name. The server's verification address cannot be accessed separately, but only serves as verification. The client code is embedded in the enabling and uninstalling methods when using. The specific code can be seen in the basic settings. I hope that every developer who uses this plug-in can brainstorm and develop more practical functions.
Client example code 01:
Place in the main.php file of the application
function App_ Check(){ $servername = trim($_SERVER['SERVER_NAME']); @$verifyurl = file_ get_ Contents ('service api address? Domain='. $servername); if(!empty($verifyurl)){ Return "- Authorized Edition"; }else{ Return "- Unauthorized version"; } } $check = App_ Check(); $blogtitle='Page title'$ check; <? php echo $blogtitle;?> //Output: page title - authorized version or page title - unauthorized version
Client example code 02:
Function InstallPlugin placed in the application include.php file_ App () {After the code, if you are not authorized, you will be prompted with unauthorized information after enabling the app.
function InstallPlugin_ App(){ $servername = trim($_SERVER['SERVER_NAME']); @$verifyurl = file_ get_ Contents ('service api address? Domain='. $servername); if(!empty($verifyurl)){ Return "Authorized!"; }else{ Die ("The application is not authorized!"); } }