This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Minify / Obfuscate PHP Code
I have a php file. Anyone knows of any encryption technics/keys to encrypt the code? I don't want to make it human readable. I was thinking if i could include the encrypt keys in an include file hosted separately somewhere. Any help and ideas?
Are you looking for something like Zend Guard ?
Zend Guard, the most widely accepted PHP encoding and obfuscation product on the market, protects your application from unlicensed use and reverse engineering.
I think the best way is to obfuscate the code. i've never do that on php, but i use yui for JS Code. I google'it and found http://www.codeeclipse.com/. Try that.
Nobody who cares a bit about security is going to use your app if it wants to include - e.g. EXECUTE - code from your server, loaded at runtime.
The only real solution if you really need to encrypt your code (usually you don't!) is buying ioncube or zend encoder to compile the PHP code to a bytecode which is then executed by a zend extension in the PHP core (i.e. the user needs to be able to load php extensions)
Related
This question already has answers here:
Is it possible to hide/encode/encrypt php source code and let others have the system?
(6 answers)
Closed 7 years ago.
Recently I developed a web application and I will publish it in the web by giving the code source to company which will do the necessary. All of I want is to know if there is any possibility to give them the application but without a source code, like an encrypted source code or some thing in this way. The application runs with Apache and phpmyadmin, and I don't want to make any confusing with them. Thanks a lot for you.
You can use any php code obfuscator or php code encoder
http://www.ioncube.com/ is a good code encoder and used by whmcs. And there are many free obfuscators
Obfuscation is making the source code difficult to understand for humans by changing the source code. It sometimes reduces size too. Encoders represent the code in another form which is difficult for humans.
This question already has answers here:
PHP source code security on server
(8 answers)
Closed 9 years ago.
If I have a php code on my website is there any way for a user to view it? I ask because I'm using the Pear mail package (I might change before I upload my website), and it requires my email and password be in the code for it to use. Is this a potential security risk, or is there no way for the user to see this code anyways?
While we are at it, is there a good guide for hackers on how to exploit security risks(specifically SQL injections and similar methods)? It would be useful when checking my site's security, if I had a full list of all the common things that hackers try, and explanations for how to do them.
Keeping a password in a PHP program file is extremely common practice.
As long as you've named all your files with a .php extension, and your server is configured to process .php files as PHP code, then you shouldn't have any problems.
Don't use a .inc extension or anything like that, because yes, that might expose your code.
Also, it's generally a good idea to place as much of your PHP code as possible outside of the web-accessible areas. Only your base PHP file that is actually loaded on startup should be web accessible. All your includes and libraries should be safely stashed away somewhere else where they can be included, but can't be read directly.
This function will cover it:
highlight_string
This question already has answers here:
Convert a PHP script into a stand-alone windows executable
(7 answers)
Closed 9 years ago.
I have shown this Convert a PHP script into a stand-alone windows executable , but my problem is still remains :(
I have developed a Offline Application using Core P.H.P., now I want to Sell it to my client, but my problem is that I don't want to allow Client can see my Source code or can access my Source code, they can run my application on their system but cannot able to change the Code.
If I made the .EXE of my application, user cannot even copy my source code, if he/she had done this then it cannot remains useful for them,
AND ALSO THE MAIN THING IS I WANT A UNIQUE SECURITY FOR A PARTICULAR USER, EVERY USER SHOULD NOT HAVE THE SAME ACCESS KEY TO ACCESS THIS APPLICATION
I have found this on GOOGLE and also on this SITE also,but still I didn't get my answer perfectly.
Actually I have no idea about this in P.H.P, If somebody found mistakes in my question then you are pleased to suggest me.
You can use PHP LockIt Software. it will encode your code and your client can not modify your code.
Take a look at hiphop php. A good and reliable 'compiler' for PHP
http://en.wikipedia.org/wiki/HipHop_for_PHP
https://github.com/facebook/hiphop-php/
Check Zend Guard.
Zend Guard, the most widely accepted PHP encoding and obfuscation product on the market, protects your application from unlicensed use and reverse engineering.
Prevent reverse engineering & unauthorized modifications
Protect your code from unauthorized use
Zend Optimizer and Zend Guard Loader - the free runtime decoders for Zend Guard
It's really good solution to protect your project.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
websites urls without file extension?
I'm not sure what it is exactly but after looking at sites like Facebook and others I often see urls like http://www.youtube.com/results?search_query=examplequery
My question on this is sites like Facebook and others are written in PHP but don't always use the .php extension on the end like youtube's search for example instead of results.asp or results.php it just uses /results? and then adds the query string on the end.
Can anyone tell me are these using PHP/ASP.Net or is it an EXE file like a cgi program? I'm confused.
Thanks in advance for anyone who can clear this up for me.
It's not an exe file. I think in PHP you can do that by using .htaccess to remove / hide PHP extension but I don't have any idea how to do that in ASP or other language
You can use MVC model to develop your site in PHP, here is an article(http://tonymarston.net/php-mysql/model-view-controller.html) to introduce basic theory, you can take a look. BTW, if you are developing a new site, you can consider using Drupal,it should be very easy to implement MVC model with no extension.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
PHP as a Desktop Programming Language
I have developed a sales application with php (codeigniter framework). i am using xampp to run this application in local PC's browser. now i want 2 things:
is there any way to run this application as a desktop application? something like an icon will open the app and run without any browser. also without xampp to be set up.
also i want to protect the code from unauthorized using. someone can easily copy the code and run it on other computer. i want to prevent this.
please help me about these issues. thanks in advance.
PHP is not really suitable for either of these things. You're going to need a browser either way, but you could if you really wanted to use some kind of custom browser (e.g., you can use Java or .NET to create a window that has a basic browser page with only whatever controls you want to add on it rather than a full browser).
You won't be able to prevent people copying it, but you could try googling for a PHP obfuscator to make the code hard to read and you could add whatever checks you may wish to determine the PC is one you've approved (perhaps some kind of license file and you could activate it against a MAC address or something).
You can use PHP/GTK+ to create a PHP Desktop Application, but the code protection is very difficult, you can try ofuscating the code, or you can use a php compiler like this: http://www.phpcompiler.org/
I would not use php to develop a desktop application as you like, try using another language, dont use scripting, use compiled codes.
Luck with you project.
PHP is a recursive acronym which stands for "PHP: Hypertext Preprocessor." At its core, PHP is designed to process information and output it as HTML ("Hypertext"). If you wish to output information primarily as something other than HTML, PHP is probably the wrong language.
PHP is also a scripting language. That means that it is not compiled (converted from source code to machine code). As such, the scripts are human-readable. Tools such as phc exist, but if you want a compiled application, PHP is probably the wrong language.
Can you use PHP as a desktop application? Yes. Can you compile PHP? Yes. Should you? Probably not, because you are circumventing the purpose and features of the language.
If you are interested in writing client-side applications with PHP, you have to use PHP-GTK. I don't know how flexible is that. In any case, you should try it to see what it can do for you ;)