AD MANAGEMENT

Collapse

BEHOSTED

Collapse

GOOGLE

Collapse

How To: Protect your contracted work in PHP using Code Snip & IonCube

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How To: Protect your contracted work in PHP using Code Snip & IonCube

    How To: Protect your contracted work in PHP using Code Snip & IonCube

    First of all, this isn't a guide on how to use Ioncube, this is for those people who are hired at freelance sites, basically, contracted over the internet to do a PHP script. I'm not a PHP overlord, so don't expect the best coding you've ever seen in your life, but it gets the job done, and I have done this for every project ever since I thought of this.

    Forgive me if it's not exactly 100% user friendly, if you're a PHP coder who does work that's expensive enough to have to protect, you should be able to follow the steps with ease.

    Scenario: You are paid $2000 to write a PHP script for Joe Montana. Joe pays you, you send him the script, all is well, until Joe reverses the charges, leaves you out in the cold while you just wasted several weeks and he gets a free script. Now you have to stress yourself with tracking him down, pressing charges, which 99% of the time never happens. I just read the same story on another forum, which is all too common, and this prompted me to share this with hopes of protecting other programmers time and profit.

    Step 1

    Find the file that is absolutely necessary for the script to run AND won't required any modification by the client for configuration purposes, this could be the functions file (preferably), the administration home file.... etc.. basically find a file that if taken out of the picture, the entire php script (or the better part of it) would not work.

    Add this snippet of code to the top of the file (it doesn't need to be the very top, it needs to be above the critical code though).


    HTML Code:
        $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>");
        }
        }
    You'll want to edit the URL example.com to your website, and point it to a text file that is unique to this project (ie: joemontana.txt). You can also edit the HTML to say whatever you want.

    What this does, is it opens this text file on your server, checks it, and continues with the script. If you write the one word...

    kill

    Inside the text file, his script will exit every single time someone tries to run it. If your server is down, the file doesn't exist, anything other then the word "kill" is in it, etc. etc. the script will run fine.

    Step 2

    You now need to encode this PHP file so that they cannot remove that code snippet and be on with their day. I prefer Ioncube, but if you use something else, by all means, go ahead... as long as it's secure.

    Go to http://www.ioncube.com - Go to Products -> Online Encoder. It costs 50 cents to encode a file (You have to make a minimum $5 deposit though, which is good if you plan on doing this for all your projects). Encode the file. If you open it in a text editor, it should look like a bunch of jibberish.

    Step 3

    If you used Ioncube, when you distribute the script to your client, ensure that you include a ioncube loader for their server (it includes instructions on how to install it for their server administrator), and make sure you instruct them to upload the encrypted file in BINARY mode.

    That's it. Now if you get a chargeback, just put the word 'kill' in that file that the code snippet points to and be on with your day. At least now if they screw you, you can screw them back.

    I encourage you to let your client know that this one file is encrypted, but after a provisionary period of 1-2 months (whatever, long enough so that they can't charge you back) you'll send them the real file which won't require any more ioncube extensions.

    This is a pretty basic solution, because there are some ways around it I'm sure, but only if they realize how you are doing it, I'm not going to publish any possible ways (and I encourage none of you to either) in the event that someone comes searching for a way to "undo" your protections.

    These instructions are provided without warranty. Any damage or loss, yadda yadda yadda *insert long disclaimer here*, is your own fault.

    http://img76.imageshack.us/img76/6450/sc2but4ng.gif | http://img495.imageshack.us/img495/7...gorwtan0je.gif | <a href="http://webtools.sc2.info"><img src="http://img129.imageshack.us/img129/8682/sc2webtan7ju.gif" border="1" width="100" alt="Free Webtools for all" /></a> | <a href="http://www.indexrated.com"><img src="http://img398.imageshack.us/img398/4813/listed1pb.gif" border="1" width="100" alt="Index Rated Directory - Rating Quality Sites" /></a>

    Get all Games,Apps and Wallpapers Nokia, Samsung and Sony Erricson!!


  • #2
    Re: How To: Protect your contracted work in PHP using Code Snip &amp; IonCube

    Thanks for this Very helpfull.
    Richard Anderson
    Galaxy-Solutions, LLC (http://galaxy-solutions.net)
    Dedicated Servers Starting from only $25.99/month
    Personal Number: (386) 259-1188 || Office Number: 1-888-751-0100

    Comment


    • #3
      Re: How To: Protect your contracted work in PHP using Code Snip &amp; IonCube

      this one is pretty good, i think when i want to make my own site i will use it!
      Thanks again!

      Comment


      • #4
        Re: How To: Protect your contracted work in PHP using Code Snip &amp; IonCube

        Wow so much INFO, thanks a lot this will help me a lot.

        Comment

        Unconfigured Ad Widget

        Collapse

        Announcement

        Collapse
        1 of 2 < >

        FreeHostForum Rules and Guidelines

        Webmaster forum - Web Hosting Forum,Domain Name Forum, Web Design Forum, Travel Forum,World Forum, VPS Forum, Reseller Hosting Forum, Free Hosting Forum

        Signature

        Board-wide Policies:

        Do not post links (ads) in posts or threads in non advertising forums.

        Forum Rules
        Posts are to be made in the relevant forum. Users are asked to read the forum descriptions before posting.

        Members should post in a way that is respectful of other users. Flaming or abusing users in any way will not be tolerated and will lead to a warning or will be banned.

        Members are asked to respect the copyright of other users, sites, media, etc.

        Spam is not tolerated here in most circumstances. Users posting spam will be banned. The words and links will be censored.

        The moderating, support and other teams reserve the right to edit or remove any post at any time. The determination of what is construed as indecent, vulgar, spam, etc. as noted in these points is up to Team Members and not users.

        Any text links or images contain popups will be removed or changed.

        Signatures
        Signatures may contain up to four lines

        Text in signatures is subject to the same conditions as posts with respect decency, warez, emoticons, etc.

        Font sizes above 3 are not allowed

        Links are permitted in signatures. Such links may be made to non-Freehostforum material, commercial ventures, etc. Links are included within the text and image limits above. Links to offensive sites may be subject to removal.

        You are allowed ONLY ONE picture(banner) upto 120 pixels in width and 60 pixels in height with a maximum 30kB filesize.

        In combination with a banner/picture you can have ONLY ONE LINE text link.


        Advertising
        Webmaster related advertising is allowed in Webmaster Marketplace section only. Free of charge.

        Shopping related (tangible goods) advertising is allowed in Buy Sell Trade section only. Free of charge.

        No advertising allowed except paid stickies in other sections.

        Please make sure that your post is relevant.


        More to come soon....
        2 of 2 < >

        Advertise at FreeHostForum

        We offer competitive rates and a many kinds of advertising opportunities for both small and large scale campaigns.More and more webmasters find advertising at FreeHostForum.com is a useful way to promote their sites and services. That is why we now have many long-term advertisers.

        At here, we also want to thank you all for your support.

        For more details:
        http://www.freehostforum.com/threads...eHostForum-com

        More ad spots:
        http://www.freehostforum.com/forums/...-FreeHostForum
        See more
        See less
        Working...
        X