itzjmoco Posted December 21, 2012 Share Posted December 21, 2012 I am in the prosess of making a script that will be 95% encode and sold. Some of my pages will be encoded such as my functions.php and some pages that have the layout and smaller stuff that i don't mind people changing will not. So on every page there is a powered by line using the following code: <?php echo $poweredby; ?> including the ones people can edit. The contents of the powered by line are in the functions.php so they can't edit that but nothing is stopping them from just removing the above code from the non-encoded pages. So in short i am wondering if it would be possible to create a function that can be placed in functions.php that will check to make sure $poweredby is on each page? Quote Link to comment Share on other sites More sharing options...
cpd Posted December 21, 2012 Share Posted December 21, 2012 You'd have to get the contents of the raw page and search for the $poweredby variable. In all honesty its not worth it and in most cases the overhead involved with encrypting/decrypting everything isn't worth it either. As a php dev its something you learn to live with and is usually addressed through a User License Agreement. Quote Link to comment Share on other sites More sharing options...
itzjmoco Posted December 21, 2012 Author Share Posted December 21, 2012 I may not even end up doing it but i would be nice to know how. I have something like this that i am already using for a different part of my site. I am not sure if it can be changed to work. <?php $response = file_get_contents("http://domain.com/test/index.php"); if( $response != 'Powered By Script Name' ) { //Do something. For our example, kill the script. echo "No Copyright kill script"; die(); } //End Check // Do normal code... ?> Quote Link to comment Share on other sites More sharing options...
cpd Posted December 22, 2012 Share Posted December 22, 2012 Running that on the final output every time isn't worth it in my opinion. You can worry for hours over something so petty or get on with developing your system. Quote Link to comment Share on other sites More sharing options...
itzjmoco Posted December 22, 2012 Author Share Posted December 22, 2012 I guess i will get help some place else. All i am getting here is its petty. Little tip if your going to try and help on a php support site... then help. People come here for help not for people's opinion if something is petty or not. Quote Link to comment Share on other sites More sharing options...
Jessica Posted December 23, 2012 Share Posted December 23, 2012 This topic has been discussed many times on here. Encrypting code is mostly useless. Selling software as a service is a good option, if you're willing to host it. Quote Link to comment Share on other sites More sharing options...
Christian F. Posted December 24, 2012 Share Posted December 24, 2012 Twistedvengeance: Why are you persisting in posting badly written code that does not solve the question of the OP? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.