#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0

    Script to check license and "call home"


    Sorry if this was asked before but I couldnt find anything on the forum, search button wasnt working...

    Anyway, I'm a designer and I sell my designs, and I would like to know if it is possible to get a script that would like "control" license and who is using them. Like, if I sell my design to John Doe, and his license is for 1 use only (1 website only), this script will work only on his website.

    Ive bee using this code

    Code:
    function anonymous() {
    if(~location.protocol.indexOf('http:')&&~location.host.indexOf('examplesite.com')){}else(location.href='http://mywebsite.com')
    }
    but this code redirects the website, and now its no good because once it redirects, whoever is trying to install it will be aware of the script. I need something that I could see the website who is using my work without permission, without whoever is sing it knowing.

    Is it possible?
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    simple answer: Don't do it.

    What you're trying to do there is called malware. I understand that you wanna protect your work, but "hiding" code which contacts other websites or whatever is a, very bad idea. Any customer who catches you doing that will be seriously p*ssed off, and they will be right about that.

    Apart from that, this kind of "protection" is laughable. Anybody can find and remove it in a matter of seconds. It's like the stupid right-click blockers people used to have in the 90s.

    Protecting layouts is impossible. Period. No matter what you do, people can easily circumvent it if they want to. Your "protection" will only annoy legitimate users. You should accept that. There is no technical solution for this problem.

    Do you even have a problem with customers constantly violating your licence?
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,238
    Rep Power
    9400
    As Jacques touched on, the best solution for interpreted code (meaning you'd handle the problem differently with PHP than you would with Java or C#) is a license. Anything you put in code to verify itself can be easily removed or circumvented because the user can not only read but write code into your application. A false sense of security, in a way.

    With that said, there are things out there like ionCube which can help, but as a developer myself if I can't see the code then I'm much less likely to use it - let alone buy it.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0
    Yes I had a couple of people using my work without any sort of license, and the past couple of months this works are my main income, things like this kinda hurt my wallet.

    So its not a good idea to do it? So I'm gonna stick with the redirect script and the metas.

    Thank you for the answer
  8. #5
  9. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Originally Posted by the_wanted_man
    So I'm gonna stick with the redirect script and the metas.
    No, no. Please remove any redirect stuff that may be lurking in your code. It will affect the users of the website, and you really have no right to do that.

    Put your licence, copyright notices etc. into the code. That's it. Anything else is a matter of social pressure and maybe lawyers.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  10. #6
  11. Confused badger
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Mar 2009
    Location
    West Yorkshire
    Posts
    1,151
    Rep Power
    487
    Originally Posted by Jacques1
    Put your licence, copyright notices etc. into the code. That's it. Anything else is a matter of social pressure and maybe lawyers.
    Agreed, IP Rights are a big deal and the only way to protect your code; if you find the people using it without permission then "Release the houds (lawyers)"
    "For if leisure and security were enjoyed by all alike, the great mass of human beings who are normally stupefied by poverty would become literate and would learn to think for themselves; and when once they had done this, they would sooner or later realise that the privileged minority had no function and they would sweep it away"
    - George Orwell, 1984
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    4
    Rep Power
    0
    PHPLicengine is a php license management system. You can try their trial version to get an idea to implement your own.

IMN logo majestic logo threadwatch logo seochat tools logo