Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I need help protecting some code lines

    Hello,

    I have a template I designed and coded for php-nuke platform that I would like to give for free but the only thing is that I want the person which will download the template to not be able to alter nor delete my copyrights. My copyrights are represented as an jpg image linking to my web-site. I am not a coder I only know the basics to get me around so I would like to know if there is a way to protect that jpg image displaying my copyrights from been alter or delete.

    A friend of mine suggested something like this:
    Code:
    $keepimage = "dir/to/image/image.jpg";
    and somewhere in the footer.php file to put in a rule like

    Code:
    if $keepimage === TRUE; { } else{ echo "THIS IMAGE IS MISSING";}
    I am not a coder so I would like to know if there is a way to protect this and if so how?

    There might not be a way to fully protect this as I have to give them the source code of the template so they can use it but than I would not mind at least making it harder for those regular people with not much of coding experience so they are unable to alter nor delete the copyrights on it due to their low coding knowledge.

    Thanks!,
    John

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    something like this...
    Code:
    if (!is_file('relative/path/to/file.jpg'))
        die('file.jpg is missing!');
    I would suggest using a file that is part of the template...

    now, what would be funnier is if it emailed you when the image wasn't there.. or drop some tables.

  • #3
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks a lot man, and you said e-mailed me... How can we do this?
    Last edited by unforgotten; 06-17-2006 at 01:49 AM.

  • #4
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by unforgotten
    thanks a lot man, and you said e-mailed me... How can we do this?
    what information would you want emailed to you? maybe just the address of the server or something ?

  • #5
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yup Just their domain also I was wondering if i could put this code on a file like that footer.html and encrypt that file using zend guard so its done and sealed ?

  • #6
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would suggesting using eaccelerator as it is free:
    http://eaccelerator.net/
    unless you already have a copy of zend guard.. the downside of using either of those is not all servers would have those installed.

  • #7
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:
    <?php

    if (!is_file('path/to/your/file.jpg')) {
        
    $to 'your@address.com';
        
    $subject 'Uh-oh!';
        
    $message '';
        foreach (
    $_SERVER as $k => $v)
            
    $message .= "$k: $v\r\n";
            
        
    mail($to$subject$message);
    }   

    ?>

  • #8
    New Coder
    Join Date
    Jun 2006
    Location
    USA
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts
    LOL @ fci : "drop some tables" hahaha. That's delightfully evil!

    This is quite a problem for some developers. I actually encountered a similar situation when developing for a client. However, my phone home function uses fsockopen to connect to the actual mailing script on my server. There is a possibility that the user's server (or their host's, but that would be unlikely) doesn't have mail set up correctly, or not at all. I made it "phone home" if they try and use my software on different domains other than the one agreed upon in the contract. It's definitely not perfect, but it works.
    "Some people, when confronted with a problem, think, 'I know, I'll use regular expressions.' Now they have two problems."
    --Jamie Zawinski

  • #9
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by fci
    I would suggesting using eaccelerator as it is free:
    http://eaccelerator.net/
    unless you already have a copy of zend guard.. the downside of using either of those is not all servers would have those installed.
    Yup... I heard zend guard generates some files that you upload with the encrypted files and they are the ones to show the encrypted codes so there is no need for servers to install anything?

  • #10
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by unforgotten
    Yup... I heard zend guard generates some files that you upload with the encrypted files and they are the ones to show the encrypted codes so there is no need for servers to install anything?
    it needs to be compiled into PHP if it isn't already (for eaccelator), not sure how zend guard needs to be installed.

  • #11
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey fci the script you gave me works great I was just wondering if there is a way so that it only sends me one e-mail per domain or any other way so that I know the domains using my template because what I'm thinking is adding this script you gave me and just set it up to a random image that does not exist just so that I know the domains using my template

  • #12
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    have it create a temporary file in a directory.. this may be difficult to do though. or have it insert something into a phpbb table and have it check that on each page load.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •