PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have downloaded a trial version of a PHP product. I found that all the files do nothing more than loading a custom extension and executing the only function that extension provides:
// Load the extenion (.so file)
$stuff = 'KqhaSkZO5qbA...'; // long gibberish
the_custom_decode_function($stuff);
The only thing that differs among the files is (obviously) the $stuff string. Everything else is the same.
I found it interesting. I wonder if this is what people usually do to actually hide the source code? I imagine you cannot 'decompile' .so files (I think the equivalent on Windows is .dll)?
This is ineteresting. Then in theory, I could write my app completely in C and compile the source into PHP extensions. But what about the usual stuff like form processing, reserved PHP globals etc? Can it also be done within such extensions? For example, can I 'ask' PHP to provide me with $_GET vars so that these could be used in the extensions?
I wonder if people often write whole apps in C and put them in extensions? Isn't it a good way to build a commercial, closed source, licensed product? It must be done pretty often I think, unless there are any significant disadvantages of doing it that way.
Ree wrote:I wonder if people often write whole apps in C and put them in extensions? Isn't it a good way to build a commercial, closed source, licensed product? It must be done pretty often I think, unless there are any significant disadvantages of doing it that way.
90% of web developers wouldn't know how to install it, or wouldn't have the level of server access required to install it. Unless it's something you can sell to hosting companies you'll be limited to people who run their own servers .. still not particularly common in the industry.
Install what? Extensions? Installing extensions is easy enough.
But yes, I imagine there are pretty much no shared hosts that would allow you to load your own extensions? In that case you really limit your potential customers...