|
Hope I'm making this blog stuff right, 1st timer.
Ok, I came here to ask for help with PHP.
I've written a bunch of code, have been testing it and all, it's almost done. Now I want to make a .dll from it, so I can hide the code that I've written.
How do you do that? I've googled it and the results were very obscure to me, some say you cant do that, others say you have to write the code in C then make it a dll and then import in the PHP script.
The code itself is not ready yet, but I wanna try this out first before I make it any bigger.
Thank you!
|
Is it even possible to convert PHP to DLL easily without re-coding everything? I thought dll had to be in specific syntax. I know I used to create activeX.dll's using visual basic but it was using C/C++ not php...I'd imagine there should be a way to do what your saying, but I'm not a CS major... some programming gurus would know more about this than me, I just mess around for fun in my free time lol.
|
|
On May 19 2010 07:21 LuckyFool wrote: Is it even possible to convert PHP to DLL easily without re-coding everything? I thought dll had to be in specific syntax. I know I used to create activeX.dll's using visual basic but it was using C/C++ not php...I'd imagine there should be a way to do what your saying, but I'm not a CS major... some programming gurus would know more about this than me, I just mess around for fun in my free time lol.
Oh, actually I've to write a php extension, no need to make a dll. All i wanted is to hide my source code. :D
|
DLL is a library in Windows. What I'm assuming you're looking for is a way to encrypt PHP scripts. There's a program called Zend Guard that does this, but I've never tried it.
|
oh right you can just use an extension. nifty
|
Source code obfuscation is never a good idea unless you have something (crappy code, insecure, etc) to hide.
|
I meant hide the code so that I could, lets say, sell it, so no one could actually copy/paste my code.
|
I can definitely see the advantages to hiding the code, helps keep people from copying it especially if your selling it but by hiding your code you're becoming like a mini evil microsoft. One of my friends at my work says the software development field would be so much better if all software, web pages and everything programming related was open source so people could keep improving and making more powerful applications.
my personal opinion is it should vary depending on what is being developed. Linux is open source and that's what they advertise, microsoft is really closed doors on their stuff and some of their crappy applications never get fixed or it takes much longer and never gets done right. and they overprice their crappy applications and seemingly force everyone to use them.
|
Most code obfuscation schemes I've come across are easily reversible, so if you're really scared of someone seeing your code you should probably write it in something else than PHP.
|
Canada9720 Posts
you're not going to make any money distributing compiled php, if that's your intent.
i don't even know why you would want to hide it anyway. some of the best code on earth is open source, and if you're posting a question like this, i'm going to assume you're no programming rockstar. maybe you could post what exactly you're writing it for, so people can help you figure out a more helpful way to distribute it.
|
lol
Im not intending to sell anything, I just used an example of what I wanted to express (I need more english skills to make myself clearer). I'm just curious about how this works, doesnt hurt to learn new stuff
If you are interested, Im developing a bracket manager (single elimination only). And hell, Im really far away from being a great programmer :/
|
If you don't want people to see your PHP code, the only way you could do it is to run your app as an application service provider, rather than distribute the software. Otherwise you would need a machine code compiler with an embedded garbage collector, and it would only run on a client, not a webserver which is the primary reason why anyone would even write in PHP in the first place because its such a bad language, and most webservers only support PHP.
If people want to reverse engineer your code, it will always be possible unless its machine code compiled, and even then, some crazy freaks can still reverse engineer it depending on how big it is.
Interpreted code is a synch to reverse engineer no matter how much its obfuscated, bytecode is the next level up from that but most webservers won't run straight bytecode, instead they will interpret the PHP code and convert it to bytecode which is hidden, and then run from that.
|
Even if you do sell the code itself, that means they own a license to the code as well. Meaning they can mess with your code either way.
|
If you want to sell it, you put a license on it and enforce it. vBulletin code is open and that isn't hugely pirated everywhere despite being a very popular forum. Requiring admins to install closed-source binary loaders or extensions just to run you code is pretty bad form.
|
Yeah I agree license it and enforce the license. Who would want to buy a piece of software they can't maintain/customize? I don't care how great you think your php is, no business will touch it if they can't adapt it to their specific needs.
|
On May 19 2010 07:24 R1CH wrote: Source code obfuscation is never a good idea unless you have something (crappy code, insecure, etc) to hide.
R1CH is the man!!!!
props to him, aas always
|
|
|
|