How do you. Domain license a script.

Discussion in 'PHP' started by exodus, Jul 24, 2007.

  1. #1
    I was wondering how can I lock a script into using 1 domain? Is there a tutorial over how I can do this? What are the steps and code needed to make sure a script can not work on another domain expect for a licensed domain? Also, I would like to encrypt it so others can not change it.
     
    exodus, Jul 24, 2007 IP
  2. HuggyCT2

    HuggyCT2 Guest

    Messages:
    222
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I have made things like this before, and I have been making a better one for a new project I am undertaking. www.clan-cms.co.uk

    I can sell you a copy of the script and give you means to encode the actual php code. The method is not completly secure as with alot of persistence people can crack it. You would need to pay for it to be 100% encoded.

    Glen
     
    HuggyCT2, Jul 24, 2007 IP
  3. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #3
    Uhm, okay. Thanks for the solicitation. I was hoping for some help in finding out how to do it myself. I know I will use a third party to encrypt the final code, but how do I make sure only the licensed domain is used for a script? Do you think a remote include of a php file would be best or just a internal check of the domain?
     
    exodus, Jul 24, 2007 IP
  4. personalpa

    personalpa Peon

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    PHPAudit & Ioncube.
     
    personalpa, Jul 24, 2007 IP
  5. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #5
    Maybe I did not ask for the right thing. I know about IonCube and different encryptors of the scripts. What I was asking for is how can I make sure the script is only used on the domain a buyer is licensing the script upon?


    
    if( !( ini_get(allow_url_fopen) ) ) exit('Configuration Error: allow_url_fopen must be turned on for this script to work');
    $lines = @file('http://www.example.com/joemontana.txt');
    foreach ($lines as $line_num => $line) 
    {
      $license = htmlspecialchars($line);
      if ($license == "kill") 
      {
         exit("<font color=white><b>Your Script License Has Been Terminated<br><br>Please Contact <a href=mailto:YOUREMAIL><font color=white>YOURCOMPANY</a> Immediately</b></font>");
      }
    }
    
    PHP:
    I found this bit of code above. Is there something better?
     
    exodus, Jul 24, 2007 IP
  6. HuggyCT2

    HuggyCT2 Guest

    Messages:
    222
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Create a mysql table on your server with the keys in a auto incremen format.

    Then make a php script which will fetch the key sent via a get method.

    Take that value and check it against the database, if it returns true print 1, else print 0.

    Then in the actual licence script you can check the result by using fopen and going to the url within the script, get the data with fread, if its 1 then let the script flow, if its 0 exit out with a error

    Glen
     
    HuggyCT2, Jul 24, 2007 IP