0

I have a a button (in a simple index.html written with CSS, HTML, JQuery, and has ajax) that links to a PHP and python file. When you click it, it does stuff.

I would like to make this button accessible to anyone who I give permission to implement the button on their websites (not my other files, just the literal button) too. I want it to be called with one line of code, and then also pass a "key" (something I provide them), so I can control who can access the button.

I have no clue how to do this. I thought of just creating a super div to hold everything in index.html (but that doesn't solve my key problem, and is probably very inefficient).

Bobshark
  • 161
  • 2
  • 10

1 Answers1

0

This question can have a wide array of answers that probably range from basic solutions to a potential user management system. Here's how I would do this.

1.Tokens!

2.Require that all user requests to the page having the button, come with an additional parameter, a password supplied by you.Upon receipt, I would then check the parameter against a value in my database/file.This is ofcourse may very well not be secure.

3.Check the HTTP_REFERRER field.However, as per my understanding, this can be compromised.link

Also read --> this.

Community
  • 1
  • 1
Satej S
  • 1,990
  • 1
  • 14
  • 21