Jump to content

JavaScript API


The Little Guy

Recommended Posts

I am going to make a JS API that connects to a PHP script, does anyone have any suggestions on how to make it so that the API only works on the site of the user who registered the site?

 

Here are/were my thoughts of doing this:

 

[*]create a unique code that is required to identify the site

[*]check the referrer of the site that is connecting to the API

[*]if the two values match up in the database allow usage of the API

[*]if the two values don't match up in the database don't allow usage of the API

 

That is what I have come up with, now I am not sure how secure this would be so does anyone have any suggestions to make it so that only the registered domain can use the API?

Link to comment
https://forums.phpfreaks.com/topic/251022-javascript-api/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.