Hiding copyright info via php to deter removal

03-15-05, 04:18 PM
|
|
Newbie Coder
|
|
Join Date: Nov 2003
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hiding copyright info via php to deter removal
Hello,
I need some advice on how to insert a copyright info on the footer so that other webmasters would not remove the copyright info at a later time.
In order to do this, you would need to hide the code using php, I think.
A perfect example is Invision Board pages. Webmasters can not remove their copyright footer (unless you pay a hefty fee) and I like to do something similar to that effect.
Any idea on how to approach this little project? Thank you in advance.
|

03-16-05, 06:26 AM
|
|
Wannabe Coder
|
|
Join Date: Oct 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You could set the copyright code into a file that is needed to run your program, then encode that single file using IonCube ( http://www.ioncube.com/online_encoder.php). That way if they remove the include the program wont work, but they wont be able to edit the file either.
|

03-16-05, 08:03 AM
|
|
Junior Code Guru
|
|
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
easy solution: encrypt your code using multiple levels of encryption. (code is still able to be reverse-engineered by advanced developers)
corporate solution: php encoder (zend encoder, ioncube, etc)
__________________
just an ignorant noob with moronic solution...
|

03-16-05, 08:34 AM
|
 |
Wannabe Coder
|
|
Join Date: Jun 2003
Location: Denver, Colorado
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The cheap and easy, though not 100% solution...
Many methods of functions return something. Typically this is a single value. Try putting your copyright into a base64_encoded string inside of a common function. Return the value, or property, of that function as an array. Use the "real" value ($response[0]) as you would normally use it. Set aside the copyright tag in either a session, cookie, or icky global variable. When you get to the end of the page, or where ever you want to display it, bust out a echo(base64_decode($response[1])). This will make "Copyright Me" un-detectable in a global code search. You can set-up a funky ereg or preg match to test the encoded string prior to use to make sure it matches what it should. If it doesn't, spin off a javascript loop that spawns hundreds of browser windows.  Just kidding.
Through out your code, you can keep checking the value of $response[1] to make sure things are legit. If you take the time to saturate your goods, it may be too much of a pain in the butt to pull out.
I'm not sure if echo or print returns a value when executed. That is
if(ereg("Cac7u5",$response[1])) {
if(!echo(base64_decode($response[1]))) {
die("Bad man! Bad man!");
}
} else {
die("Bad man! Bad man!");
}
Anybody? Of course ecoding your code is the best way to go, but if yo are poor like me, that may not be an option. The above is a shot from the hip, so don't quote me on any of it. Unless of course it actually works. 
__________________
The Universe Our God, Nature Our Temple, Love And Duty Our Religion, Knowledge Our Happiness And Consolation, Death The Dissolution Of The Ego, And The Return To Eternity.
|

03-16-05, 09:46 AM
|
|
Junior Code Guru
|
|
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
consider i were the webmaster. since the script is open source (or i can still view the source, i'll change the following):
into
of course it's rough, but it works (you can even delete the code, since you have the php source).
as i mentioned before, if you don't want to buy any encoder, you can obfuscate the code, maybe something like
however, you may end up with "eval". nah, it's easy for some developers out there to reverse-engineer the code. (first, change eval with echo and print, and then break the encoding).
unlike obfuscator, php encoder works in different way. the encoder converts php file into php bytecodes. as a result, the original php script is very difficult to retrieve (it's not a trivial task). if you find obfuscated code in first solution to run slower than its original, php bytecodes can run faster in your system because your php code is not parsed anymore.
__________________
just an ignorant noob with moronic solution...
|

03-16-05, 11:14 AM
|
|
New Member
|
|
Join Date: Mar 2005
Location: Indiana
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
A very good idea yes if one has no monies to work with, however, Base64 encoding would ultimately backfire to advanced developers. Definitely try Zend if you are that worried about it. But do remember this, that no matter what you do people will find a way around it. If there is a way to do something there is a way to undo something. Believe it or not you will come across honest people who will leave the copyright notices intact. Better yet for those whom you can prove have removed your copyright notice in direct violation of whatever license you have in place whether a mere GPL, Click-Wrap license, or shrink wrap license - you will be able to sue for hefty amount. So in the long run I personally don't think you need to concern yourself with "embedded" copyright notices.
Quote:
|
Originally Posted by Trevor
The cheap and easy, though not 100% solution...
Many methods of functions return something. Typically this is a single value. Try putting your copyright into a base64_encoded string inside of a common function. Return the value, or property, of that function as an array. Use the "real" value ($response[0]) as you would normally use it. Set aside the copyright tag in either a session, cookie, or icky global variable. When you get to the end of the page, or where ever you want to display it, bust out a echo(base64_decode($response[1])). This will make "Copyright Me" un-detectable in a global code search. You can set-up a funky ereg or preg match to test the encoded string prior to use to make sure it matches what it should. If it doesn't, spin off a javascript loop that spawns hundreds of browser windows.  Just kidding.
Through out your code, you can keep checking the value of $response[1] to make sure things are legit. If you take the time to saturate your goods, it may be too much of a pain in the butt to pull out.
I'm not sure if echo or print returns a value when executed. That is
if(ereg("Cac7u5",$response[1])) {
if(!echo(base64_decode($response[1]))) {
die("Bad man! Bad man!");
}
} else {
die("Bad man! Bad man!");
}
Anybody? Of course ecoding your code is the best way to go, but if yo are poor like me, that may not be an option. The above is a shot from the hip, so don't quote me on any of it. Unless of course it actually works. 
|
|

03-16-05, 01:44 PM
|
|
Code Guru
|
|
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
also you could include it in a function (bad word filter for example) so when you call it you could check for the copyright statement...
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.
codR.us <-- Submit and vote for your favorite code snippets with codR.us.
XEWeb.net <-- The ultimate PHP resource network.
|

03-18-05, 02:44 PM
|
|
Newbie Coder
|
|
Join Date: Nov 2003
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I really appreciate all your responses.
Allow me to give more details. The site is actually a private site (like an intranet). I am the only webmaster but there are few other HTML newbies that know the basic HTML. I don't want them to edit (delete) out the copyright info.
So the encoding is out of the question.
Nothing complex. Trying to find out if there is an easy method to prevent others from editing the copyright HTML code by editing the html/php file.
Thanks in advance!
|

03-18-05, 03:05 PM
|
 |
Community Liaison
|
|
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
|
|
use an include statement and change permissions on the file to read only
__________________
Yep, it's a signature...
|

03-19-05, 01:10 AM
|
|
Newbie Coder
|
|
Join Date: Nov 2003
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
|
Originally Posted by bizzar528
use an include statement and change permissions on the file to read only
|
Hello bizzar528, how do you use an "include statement?"
Thanks..
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|