A
A
AlpineMilk2020-05-21 12:54:35
PHP
AlpineMilk, 2020-05-21 12:54:35

How to make a paid monthly product subscription system?

Good day to all!
The idea is that there will be a library on the server that adds some functionality to the site for subscribed users. Almost all functionality is written in js. It is very important that users do not see the code other than what I provide them. I want to do like facebook does with inline comments, giving users a code to embed on the page (html block, and js with its id and active license) Here is an example of facebook

<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v7.0&appId=&autoLogAppEvents=1"></script>

Well, or something similar. Users will add this code on their page themselves.
How can this be done? What technologies will I need?
If something is not clear, then please ask your questions in the comments

PS This is how Facebook comments look after pasting the code
5ec6531c69b23351565569.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MagicMight, 2020-05-21
@MagicMight

Request the code not as a js file, but by giving it through PHP after checking the user's permissions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question