├── php standalone
├── server
│ ├── install
│ │ ├── footer.php
│ │ ├── database.sql
│ │ ├── images
│ │ │ └── settings.png
│ │ ├── configuration
│ │ ├── settings.inc
│ │ ├── css
│ │ │ └── styles.css
│ │ ├── install.php
│ │ ├── index.php
│ │ └── install2.php
│ ├── index.php
│ ├── add.php
│ ├── check.php
│ ├── stylesheet.css
│ ├── admin.php
│ └── license.txt
├── install_server.txt
├── client
│ └── index.php
└── install_client.txt
├── wordpress edition
├── wp-content
│ └── themes
│ │ └── license-key-server
│ │ ├── footer.php
│ │ ├── header.php
│ │ ├── 404.php
│ │ ├── single-key.php
│ │ ├── style.css
│ │ ├── dashboard_func.php
│ │ ├── index.php
│ │ ├── dashboard.php
│ │ ├── functions.php
│ │ └── license.txt
└── documentation.pdf
├── README.md
└── LICENSE
/php standalone/server/install/footer.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/php standalone/server/index.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/php standalone/server/install/database.sql:
--------------------------------------------------------------------------------
1 | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--------------------------------------------------------------------------------
/wordpress edition/wp-content/themes/license-key-server/footer.php:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/wordpress edition/wp-content/themes/license-key-server/header.php:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/wordpress edition/documentation.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yehaicao/license-key-manager/master/wordpress edition/documentation.pdf
--------------------------------------------------------------------------------
/php standalone/server/install/images/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yehaicao/license-key-manager/master/php standalone/server/install/images/settings.png
--------------------------------------------------------------------------------
/wordpress edition/wp-content/themes/license-key-server/404.php:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/php standalone/server/install/configuration:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/wordpress edition/wp-content/themes/license-key-server/single-key.php:
--------------------------------------------------------------------------------
1 |
17 |
--------------------------------------------------------------------------------
/php standalone/server/add.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/wordpress edition/wp-content/themes/license-key-server/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | Theme Name: License Key Server
3 | Theme URI: https://github.com/icryptic/license-key-manager
4 | Description: License key management server.
5 | Version: 1.0
6 | Author: Jason Jersey
7 | Author URI: http://twitter.com/degersey
8 | License: GNU General Public License v3 or later
9 | License URI: http://www.gnu.org/licenses/gpl-2.0.html
10 | Text domain: wp_license_key
11 | */
12 |
--------------------------------------------------------------------------------
/php standalone/install_server.txt:
--------------------------------------------------------------------------------
1 | You can assign a key to a user and then call the script to check if the key is valid or not.
2 |
3 | Installation
4 |
5 | 1) Create a new mySQL database and user
6 |
7 | 2) Add the new user to the database with full permissions granted
8 |
9 | 3) Upload the contents of the /server/ folder to your server where you want to install the license server script.
10 |
11 | 4) Navigate to the /intsall/ directory and follow the on screen directions http://example.com/server/install/
12 |
13 | 5) After verifying the script install make sure you delete the /install/ directory.
14 |
15 | That's all. Thank you.. :)
16 |
--------------------------------------------------------------------------------
/php standalone/server/check.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/php standalone/client/index.php:
--------------------------------------------------------------------------------
1 | $line) {
17 | $license = htmlspecialchars($line);
18 |
19 | if ($license == "INVALID") {
20 | exit("Invalid License Key");
21 | }
22 |
23 | }
24 |
25 | ?>
26 |
--------------------------------------------------------------------------------
/wordpress edition/wp-content/themes/license-key-server/dashboard_func.php:
--------------------------------------------------------------------------------
1 | base == 'dashboard' ) {
15 | wp_redirect( admin_url( 'index.php?page=dashboard_view' ) );
16 |
17 | }
18 | }
19 | }
20 |
21 |
22 | function p_edf_register_menu() {
23 | add_dashboard_page( 'General', 'General', 'read', 'dashboard_view', array( &$this,'p_edf_create_dashboard') );
24 |
25 | }
26 |
27 |
28 | function p_edf_create_dashboard() {
29 | include_once( 'dashboard.php' );
30 |
31 | }
32 | }
33 |
34 |
35 | // instantiate dashboard class
36 | $GLOBALS['plugin_edf_dashboard'] = new edf_dashboard();
37 |
--------------------------------------------------------------------------------
/php standalone/server/install/settings.inc:
--------------------------------------------------------------------------------
1 |
44 |
--------------------------------------------------------------------------------
/php standalone/server/stylesheet.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
3 | }
4 |
5 | a:link, a:active, a:visited {
6 | color: #493a82;
7 | text-decoration: none;
8 | }
9 | a:hover {
10 | color: #000;
11 | text-decoration: underline;
12 | }
13 |
14 | table {
15 | border-style: solid solid solid solid;
16 | width:200px;
17 | text-align:left;
18 | border-width: 1px;
19 | border-spacing: 2px;
20 | border-color: gray;
21 | border-collapse: collapse;
22 | float:left;
23 | margin-left: 50px;;
24 | margin-right: 50px;;
25 | margin-top: 50px;
26 | }
27 |
28 | th {
29 | background-color: black;
30 | color: white;
31 | }
32 |
33 | .tablerow {
34 | background-color: #f5f5f5;
35 | }
36 |
37 | tr:hover {
38 | background-color: #dde6ff;
39 | }
40 |
41 | #loginbox {
42 | border-style: solid;
43 | border-width: 1px;
44 | width: 200px;
45 | margin-left: auto;
46 | margin-right: auto;
47 | margin-top: 100px;
48 | }
49 |
50 |
51 | #tablewrapper {
52 | width: 100%;
53 | min-height: 400px;
54 | }
55 |
56 | #addkey_wrapper {
57 | width: 300px;
58 | margin-left: auto;
59 | margin-right: auto;
60 | margin-top: 0px;
61 | }
62 | #addkey_top {
63 | width: 300px;
64 | height: 56px;
65 | }
66 |
67 | #searchkey_top {
68 | width: 300px;
69 | height: 56px;
70 | }
71 |
72 | #addkey_middle {
73 | width: 300px;
74 | }
75 |
76 | #addkey_content {
77 | margin-left: 25px;
78 | height: 20px;
79 | }
80 |
81 | #addkey_bottom {
82 | width: 300px;
83 | height: 27px;
84 | }
85 |
--------------------------------------------------------------------------------
/php standalone/install_client.txt:
--------------------------------------------------------------------------------
1 | Open index.php in the client folder. There will be a code that looks like this:
2 |
3 |
4 | //Your users unique license key
5 | define( "LICENSE_KEY", "000-0000-0000-0000" );
6 |
7 | //Checks license server to see if the license key is valid for this script.
8 | if( !( ini_get(allow_url_fopen) ) ) exit('Configuration Error: allow_url_fopen must be enabled on your server for this script to work');
9 |
10 | define( "LICENSE_SERV", "http://example.com/server/check.php?key=" );
11 |
12 | $LICENSE_SERV=LICENSE_SERV;
13 | $LICENSE_KEY=LICENSE_KEY;
14 | $licserv = "$LICENSE_SERV$LICENSE_KEY";
15 | $lines = @file($licserv);
16 |
17 | foreach ($lines as $line_num => $line) {
18 | $license = htmlspecialchars($line);
19 |
20 | if ($license == "INVALID") {
21 | exit("Invalid License Key");
22 | }
23 |
24 | }
25 |
26 |
27 | Copy the above code to the root index.php file or an important functions.php file. Just keep in mind you really only need to use the above script once within your script you want to distribute. Just make sure what ever page you copy the above code to is a very important php file on your script that your script can not run if it was removed from your script. This way, if someone tries to remove the above scipt from your site by removing the file itself your script will not function or if someone enters the wrong product license key the script will go down until they supply a valid key.
28 |
29 | Also make sure you upload the key.php file to the root of your script.
30 |
--------------------------------------------------------------------------------
/wordpress edition/wp-content/themes/license-key-server/index.php:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
3 |
Node:
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
= PHP API =
16 | To get started, first read the
documentation.
17 |
//your users unique license key
18 | define('KEY_CODE', '0000-0000-0000-0000');
19 |
20 | //callback license key server
21 | $LICENSE_KEY = KEY_CODE;
22 | $keydata = file_get_contents("/?key=$LICENSE_KEY");
23 |
24 | //license node
25 | if (!isset($_GET['icryptic'])) {
26 |
27 | //check if license node online
28 | $license_node = curl_init('/'); //node domain
29 | curl_setopt($license_node, CURLOPT_RETURNTRANSFER, true);
30 | curl_setopt($license_node, CURLOPT_NOSIGNAL, 1);
31 | curl_setopt($license_node, CURLOPT_TIMEOUT_MS, 400); //timeout in 400 ms
32 | $data = curl_exec($license_node);
33 | $curl_errno = curl_errno($license_node);
34 | $curl_error = curl_error($license_node);
35 | curl_close($license_node);
36 |
37 | //if offline do nothing
38 | if ($curl_errno > 0) { } else {
39 |
40 | //if online and license good do noting or else prompt invalid
41 | if(strpos($keydata, 'GOOD') !== FALSE){ }else{ exit("INVALID LICENSE KEY"); }
42 |
43 | }
44 | }
45 |
46 |
47 |
--------------------------------------------------------------------------------
/php standalone/server/install/css/styles.css:
--------------------------------------------------------------------------------
1 | A {
2 | TEXT-DECORATION: underline
3 | }
4 | A:hover {
5 | TEXT-DECORATION: none
6 | }
7 | UL {
8 | MARGIN-TOP: 10px; MARGIN-BOTTOM: 10px; MARGIN-LEFT: 0px
9 | }
10 | LI {
11 | MARGIN-LEFT: 18px
12 | }
13 | LI.error {
14 | MARGIN-LEFT: 15px
15 | }
16 | LI.grey {
17 | MARGIN-LEFT: 15px
18 | }
19 | FORM {
20 | MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
21 | }
22 |
23 | .textform {
24 | FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif
25 | }
26 | .textform A {
27 | COLOR: #2971c1
28 | }
29 | .text {
30 | FONT-SIZE: 12px; COLOR: #515151; FONT-FAMILY: Arial, Helvetica, sans-serif
31 | }
32 | .text H1 {
33 | MARGIN-TOP: 0px; FONT-WEIGHT: normal; FONT-SIZE: 18px; MARGIN-BOTTOM: 15px; COLOR: #000000; LINE-HEIGHT: 15px
34 | }
35 | .text H2 {
36 | MARGIN-TOP: 0px; FONT-SIZE: 16px; MARGIN-BOTTOM: 15px; COLOR: #000000
37 | }
38 | .text H3 {
39 | MARGIN-TOP: 0px; FONT-SIZE: 14px; MARGIN-BOTTOM: 15px; COLOR: #000000
40 | }
41 | .text H4 {
42 | MARGIN-TOP: 0px; FONT-SIZE: 12px; MARGIN-BOTTOM: 15px; COLOR: #000000
43 | }
44 | .text SPAN.date {
45 | FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #ffffff
46 | }
47 | .text SPAN.sub {
48 | FONT-SIZE: 11px; COLOR: #676767
49 | }
50 | .text A.sublink {
51 | FONT-SIZE: 11px; COLOR: #666666
52 | }
53 | .text B.black {
54 | COLOR: #000000
55 | }
56 | .text SPAN.black {
57 | COLOR: #000000
58 | }
59 |
60 | .table {
61 | PADDING-RIGHT: 15px; PADDING-LEFT: 5px; FONT-SIZE: 12px; PADDING-BOTTOM: 2px; COLOR: #515151; PADDING-TOP: 2px; FONT-FAMILY: Arial, Helvetica, sans-serif
62 | }
63 | .table SPAN.header {
64 | COLOR: #ffffff
65 | }
66 | .table SPAN.headergrey {
67 | COLOR: #676767
68 | }
69 | .table A.black {
70 | COLOR: #000000
71 | }
72 | .table SPAN.black {
73 | COLOR: #000000
74 | }
75 | .table A.blocked {
76 | COLOR: #e0a0a0
77 | }
78 |
79 | .form_button {
80 | cursor: pointer;
81 | border:1px;
82 | -webkit-box-shadow:0 6px 9px #999;
83 | box-shadow:0 6px 9px #999;
84 | border-radius:6px 6px 6px 6px;
85 | height:40px;
86 | width:80px;
87 | opacity:0.8;
88 | FONT-WEIGHT: bold;
89 | }
90 |
91 | .form_button:hover {
92 | cursor: pointer;
93 | border:1px;
94 | -webkit-box-shadow:0 6px 9px #999;
95 | box-shadow:0 6px 9px #999;
96 | border-radius:6px 6px 6px 6px;
97 | height:40px;
98 | width:80px;
99 | opacity:1.0;
100 | FONT-WEIGHT: bold;
101 | background:#209401;
102 | color:#ffffff;
103 | }
104 |
105 | .form_button2 {
106 | cursor: pointer;
107 | border:1px;
108 | -webkit-box-shadow:0 6px 9px #999;
109 | box-shadow:0 6px 9px #999;
110 | border-radius:6px 6px 6px 6px;
111 | height:40px;
112 | width:80px;
113 | opacity:0.8;
114 | FONT-WEIGHT: bold;
115 | }
116 |
117 | .form_button2:hover {
118 | cursor: pointer;
119 | border:1px;
120 | -webkit-box-shadow:0 6px 9px #999;
121 | box-shadow:0 6px 9px #999;
122 | border-radius:6px 6px 6px 6px;
123 | height:40px;
124 | width:80px;
125 | opacity:1.0;
126 | FONT-WEIGHT: bold;
127 | background:#FC032C;
128 | color:#ffffff;
129 | }
130 |
131 | .help_icon{
132 | cursor: help;
133 | border:1px;
134 | }
--------------------------------------------------------------------------------
/php standalone/server/install/install.php:
--------------------------------------------------------------------------------
1 | array());
13 | if(preg_match_all('#(?: