tinwakr Posted January 10, 2012 Share Posted January 10, 2012 Hi Everyone, Is there any way to "hide" or encrypt PHP code and allow usage after doing so as if it were the actual php file? What I would like to do is be able to access a PHP class file like an ASP.Net dll file. I have been reading some documentation on various PHP obfuscating/encryption techniques and it seems pretty complicated, and some need to install modules on the server in which most hosting companies won't. Is there an easier way to do something like this, if there is a way at all? Thanks in advance for any and all information. Chuck Quote Link to comment https://forums.phpfreaks.com/topic/254750-create-a-php-file-like-an-aspnet-dll-file/ Share on other sites More sharing options...
ManiacDan Posted January 10, 2012 Share Posted January 10, 2012 Why do you want this? Describe the problem you're trying to solve. Quote Link to comment https://forums.phpfreaks.com/topic/254750-create-a-php-file-like-an-aspnet-dll-file/#findComment-1306265 Share on other sites More sharing options...
tinwakr Posted January 10, 2012 Author Share Posted January 10, 2012 Thanks for the fast reply ManiacDan. I am creating an WebPage class that I am going to use to design websites, I will have to include this file when I give the completed site to customers and I do not want them to be able to modify the PHP code in the original class file. If they wanted to they could create additional pages. Chuck Quote Link to comment https://forums.phpfreaks.com/topic/254750-create-a-php-file-like-an-aspnet-dll-file/#findComment-1306271 Share on other sites More sharing options...
ManiacDan Posted January 11, 2012 Share Posted January 11, 2012 The best way to do that is through ioncube or something similar. or simply through a legal agreement with the customer. Quote Link to comment https://forums.phpfreaks.com/topic/254750-create-a-php-file-like-an-aspnet-dll-file/#findComment-1306316 Share on other sites More sharing options...
tinwakr Posted January 11, 2012 Author Share Posted January 11, 2012 In doing research into ioncube I couldn't find anything that told me how to use the file after encryption. Are you presently using something like this ManiacDan? Thanks, Chuck Quote Link to comment https://forums.phpfreaks.com/topic/254750-create-a-php-file-like-an-aspnet-dll-file/#findComment-1306511 Share on other sites More sharing options...
ManiacDan Posted January 11, 2012 Share Posted January 11, 2012 Nothing changes in the way you use it, it just becomes difficult for a human to read it and edit it. Quote Link to comment https://forums.phpfreaks.com/topic/254750-create-a-php-file-like-an-aspnet-dll-file/#findComment-1306536 Share on other sites More sharing options...
tinwakr Posted January 11, 2012 Author Share Posted January 11, 2012 So, I can still use it as if it weren't encrypted: <?php require("name of encrypted file here"); class NewPage extends Class { //write code here } $newPage->displayPg(); ?> Without needing to install any modules or any other software on the server? Thanks, Chuck Quote Link to comment https://forums.phpfreaks.com/topic/254750-create-a-php-file-like-an-aspnet-dll-file/#findComment-1306597 Share on other sites More sharing options...
ManiacDan Posted January 11, 2012 Share Posted January 11, 2012 Generally that's how it works when the code is obfuscated. I don't the particulars of ioncube itself, their documentation would explain for sure. Quote Link to comment https://forums.phpfreaks.com/topic/254750-create-a-php-file-like-an-aspnet-dll-file/#findComment-1306620 Share on other sites More sharing options...
tinwakr Posted January 11, 2012 Author Share Posted January 11, 2012 Thanks for your time ManiacDan. Quote Link to comment https://forums.phpfreaks.com/topic/254750-create-a-php-file-like-an-aspnet-dll-file/#findComment-1306696 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.