canadabeeau Posted December 26, 2009 Share Posted December 26, 2009 Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some questions with it. So there is the index.php on the server of the person who bought it (www.client.com/index.php) now it has this as part of its code (in basic terms) <?php autenticatkey($key);?> Now if autenticatkey has it as being valid it does <?php include "http://www.mywebsite.com/projects/myproject.php";?> What I need to know if someone can see the code in myproject.php, can they somehow download myproject.php and how can i prevent this if they can, thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/ Share on other sites More sharing options...
vinpkl Posted December 26, 2009 Share Posted December 26, 2009 the visitor will see only the html part that php file will output. he cannot see your php code or download your php file. vineet Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984170 Share on other sites More sharing options...
canadabeeau Posted December 26, 2009 Author Share Posted December 26, 2009 vinpkl is there any way anyone get get that file, in terms of its code (between <?php and ?>)?? or not? is it just NOT possible at all. Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984175 Share on other sites More sharing options...
canadabeeau Posted December 26, 2009 Author Share Posted December 26, 2009 or am I wrong in thinking this? Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984179 Share on other sites More sharing options...
vinpkl Posted December 26, 2009 Share Posted December 26, 2009 what ever your code echoes <?php $name = 'vineet'; echo $name; ?> from the above code the visitor will just see "hello" nothing else. he will not able to see your variables name. no php code is visible to visitor. what ever your php outputs as html only that is visible. and javascript is visible. vineet Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984185 Share on other sites More sharing options...
ignace Posted December 26, 2009 Share Posted December 26, 2009 However if your code is distributed among many servers who are not hosted by you (which is why you would want to implement such functionality) will your customer or someone who they know that unlucky for you knows PHP code can easily alter your code so that authenticatkey() will always return true. Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984217 Share on other sites More sharing options...
canadabeeau Posted December 26, 2009 Author Share Posted December 26, 2009 ignace any idea on how I could go about this then? Do you think that, what if the function was called from functions.php (on my server) and then they could not make it always true, or they could but it would do nothing as it would be processing all on my server side :-) Does anyone think this can/will work Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984221 Share on other sites More sharing options...
canadabeeau Posted December 26, 2009 Author Share Posted December 26, 2009 any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984244 Share on other sites More sharing options...
BloodyMind Posted December 26, 2009 Share Posted December 26, 2009 you can obfuscate the code, or compile it Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984245 Share on other sites More sharing options...
canadabeeau Posted December 26, 2009 Author Share Posted December 26, 2009 BloodyMind, I have heard of obfuscate but compiling?? Do you mean into a web based exe? In essence what will PHP compiling do? compared to obfuscating?? Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984246 Share on other sites More sharing options...
BloodyMind Posted December 26, 2009 Share Posted December 26, 2009 no, there is no exe on linux, ZendGuard compiles the code into binary I guess, I never used it though, obfuscating worked fine for me Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984247 Share on other sites More sharing options...
canadabeeau Posted December 26, 2009 Author Share Posted December 26, 2009 so whats compiling? Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984248 Share on other sites More sharing options...
BloodyMind Posted December 26, 2009 Share Posted December 26, 2009 converting the code to machine language binary/ASCII for more info : http://en.wikipedia.org/wiki/Compiling Quote Link to comment https://forums.phpfreaks.com/topic/186367-include/#findComment-984250 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.