Jump to content

Licensing


codingmasterRS

Recommended Posts

Hi guys,

So I have some PHP script which accesses an external DB to get licensing data and then cross references with the local DB. Now I need a way to get the data from the external DB so that someone cant just alter the code and get everyones details, any ideas how this can be done?

 

Thanks in advance.

Link to comment
Share on other sites

What database platform? Whether the DB is hosted locally or remotely, you should still be able to access it using the same/normal method. In-fact it's pretty common for a hosting provider to host the database remotely on a different server.

Link to comment
Share on other sites

Okay MrAdam, you seem to have interpreted my question wrong.

 

1) I have built a PHP program

2) the PHP program uses MySQL DB (local DB)

3) The PHP program calls my MySQL DB (external DB) to cross reference for licensing

 

My question is how can I make it so that when I call to get content from externalDB how can I make it so someone can not just go and alter the code to get all peoples records from the DB/table?

 

Thanks

Link to comment
Share on other sites

For somebody to alter the code (unless your code has bugs and security flaws within it) they would need your FTP login details in order to physically edit the PHP code. However, if your code is prone to MySQL injections (which you should have tested against and fixed) then you shouldn't need to worry unless your remote database server also has security flaws.

 

In terms of "secureness", it's no different than hosting a database locally.

Link to comment
Share on other sites

I'm not sure if I'm understanding this correctly. You've written a product, which you're making available for people to buy and then download. It's licensed so you don't really want people downloading it for free? Or you don't want people to get your customer details from the database?

 

If you don't want people downloading it for free, then when they make a purchase, send them an e-mail with a uniquely generated key but only generate it when the customer has made the payment. Once that's been done, you can give them a URL containing the key which will allow them to download the file. Once it's been downloaded you can either remove the key so that it can't be re-used. I guess that's up to you.

 

In terms of people not getting customer details from the database, well that all depends on how secure the website is that you're selling the product on.

Link to comment
Share on other sites

You could limit incoming connections to specific addresses? Then allow each custom to access an admin area on your website and set their address. That won't prevent them giving it somebody else (if you're giving them something, you have absolutely no way of physically stopping them doing that) but it will make the product unusable. At least it will if I'm following you right.

Link to comment
Share on other sites

I would suggest only allowing certain hosts which are verified by your server/database. For example, you give the client a PIN to use, and if that PIN is verified with that host then all is good, otherwise make the application unusable.

Link to comment
Share on other sites

Perhaps rather than giving them full (or restricted) access to the database, you should pipe the requests through an API. That way you'll have much more control over the queries they try.

Link to comment
Share on other sites

Through some form of input (e.g. XML (or SOAP), JSON, URL parameters, etc.) you need have some form of "language" if you like that defines what it is they need. Without knowing anything about the queries or data the user would need though, I can't really give any suggestions.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.