Limiting my script to run only on certain (paid users) domains?

Discussion in 'PHP' started by Kerosene, Apr 6, 2008.

  1. #1
    I'm writing a script that I eventually hope to sell. The script will be hosted on the user's server, and will be licensed on a per domain basis.

    What is the best way to stop people from using the script on hundred of domains?

    Is it feasible to have the script 'phone home' to my server to check the referring domain? And if so, how would I go about approaching this?
     
    Kerosene, Apr 6, 2008 IP
  2. Dagon

    Dagon Active Member

    Messages:
    122
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You could implement a licensing system into your script with encoded license files. The license can be validated/renewed by phoning home but you should limit this to once daily or so to avoid significant script slowdowns.

    Phoning home on every script execution is definitely a bad idea and will cause you a lot of stress when the licensing server goes down and angry customers come after you ;)
     
    Dagon, Apr 6, 2008 IP
  3. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #3
    Thanks for the reply Dagon.

    Can you give me a basic idea of how this would work? Where do I start?
     
    Kerosene, Apr 6, 2008 IP
  4. Dagon

    Dagon Active Member

    Messages:
    122
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Here is a commercial solution: http://www.phpaudit.com/
    Browsing through the site will give you an idea of how it works and how it is implemented. I am currently writing something similar.

    The basic idea is:
    - Encode your script classes, for example with ioncube encoder. You really need encoding or at least some decent obfuscation, otherwise anyone with a little programming knowledge can erase or tamper with the licensing code.
    - Another encoded class saves and reads an encrypted license file, containg validity data (key - expiry - ip/domain - max. users - ...). This file is checked on every script execution, and if no longer valid a phone-home call to the licensing server can be made to renew it.
     
    Dagon, Apr 6, 2008 IP
  5. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #5
    basically if ur script has a admin panel u can add a track back there to see which sites are using it
    for total security u will have to encode ur script only others wise there are many nullers
     
    PowerExtreme, Apr 6, 2008 IP
  6. nQQb

    nQQb Active Member

    Messages:
    332
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #6
    Please see my signature for a licensing system..
     
    nQQb, Jul 25, 2008 IP
  7. Chris Blood

    Chris Blood Peon

    Messages:
    1,487
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I would recommend IonoLicensing.com script because it uses a local license key method that callsback say once every 15 days and stores data in an encrypted license file on the users server so its not calling back on every load. Plus Iono has got a easy php class for the licensing code to use so its easy to modify it to your needs.
     
    Chris Blood, Jul 26, 2008 IP