Skip to main content

Cara bikin lisence key gimana?

Image

Messages
8
Points
+404

Reputation: 80%

New #1

 gw  kan lagi develop HometeStream yang bisa di cek di flanime


nah aku mau templatenya pakai lisence key yang dimana jika lisencenya tidak valid maka akan ada alert key tidak valid dan langsung mengarah ke blogku


itu gimana caranya?

0
New #2
Versi murah nya, pakai Blogger.
(function (a, b) {
let webLicense = 'https://tempat-lisensi.blogspot.com',
yourLicense = 'id_post',
script = a.createElement('script');

script.src = webLicense + '/feeds/posts/default/' + yourLicense + '?alt=json-in-script&callback=window.licenseCheck';
b.licenseCheck = (post) => {
if (post.entry && post.entry.content) {

let content = post.entry.content.$t,
host = b.location.hostname;

if (content.includes(host)) {
alert('Web terdaftar');
} else {
alert('Web tidak terdaftar');
b.location.href = 'https://www.google.com';
}

} else {

alert('License salah');
b.location.href = 'https://www.google.com';

}
};
document.addEventListener('DOMContentLoaded', () => {
document.body.appendChild(script);
})
})(document, window);

1. Buat Blog baru Khusus Lisensi.
2. Buat Postingan, isi nya daftar web yang memakai template.
3. Ambil ID postingan yang baru dibuat. Ini akan dijadikan lisensi untuk pemakai template.
4. Masukkan url blog lisensi dan id post nya kedalam script diatas. Selesai.
0
Post a Comment
Forum rules
You can use English or Indonesian
Back to top Back to bottom