This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Can you “compile” PHP code?
After I write an application in PHP, why can't I compile it into machine language? I know that it's possible to make a byte-code version of the file, which (as I understand it) is basically a file that has already been parsed into tokens.
But that's not what I want. Clearly it can't work in a general sense, since compiled code will be platform-specific, but let's say I have chosen a given platform. Why can't I create a binary file that would be the same code that PHP would run when given my .php file?
You can, facebook released a project which is currently being updated for php 5.3 (supports everything lower iirc) called HipHop, you can find it here: https://github.com/facebook/hiphop-php
There are a few compilers out there like facebook's, mentioned by #Howard, or http://www.roadsend.com/home/index.php?pageID=compiler. I've never tried them though.
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:
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 10 years ago.
Possible Duplicate:
Code obfuscator for php?
Can I encrypt PHP source or compile it so others can’t see it? and how?
How is it possible to protect PHP code?
I want to encrypt PHP code so that others should not modify and cannot view the code. If I run that encrypted PHP file in the browser its functionality should work.
I have used few codes and some software like PHP Bambalam PHP EXE Compiler/Embedder ,phc-win,zzee php etc., with those I am able to encrypt PHP code but failed to run in the server. It was showing Php encrypted code instead of its functionality.
Can any one suggest me a way to encrypt a file which should be free and run that encrypted code in the server?
For ionCube (which I use), you also need the loaders installed on your server:
http://www.ioncube.com/loaders.php
Something must decrypt the file.
You don't need to do this. PHP code is run on the server, the browser never downloads it.
This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
Accessing Windows registry with PHP and DOTNET class
Is there a way to access or insert a key in a client registry with PHP? I'm writing a GTK Internet based calc for my clients.
I don't see a way of accessing the registry with PHP. Is it possible and if so, how?
With normal PHP, not on the windows machine, probably the closest you could come is using something like Javascript & XPCOM to access the information you need and then provide it back to your php code with some form of AJAX control.
Since you're using php-gtk I'm not sure if the win32std package would help you as I'm not really experienced with php-gtk. You may also be able to use WScript.shell, a rough example of which can be found here.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How do I add exif data to an image?
I want to modify some information in exif data with PHP. I've googled around but no hope. There's function in PHP, exif_read_data. But it only reads not writes. Anybody knows how or walkaround?
Looks fairly old but may be something for you: http://pel.sourceforge.net/
This gets also mentioned in the linked article from Calvin L.
http://pel.sourceforge.net/
A php extension that can write exif data, with installation instructions using PEAR. It requires that you can control which extensions are being installed on the machine that runs your PHP, which is not the case in many virtual hosting environments.