there are some lines of php code
like a copyright
that i want to encrypt
so people can't search for it and then remove it
how can i encrypt the code so it just looks like numbers and letters and not in readable format?
thanks 
there are some lines of php code
like a copyright
that i want to encrypt
so people can't search for it and then remove it
how can i encrypt the code so it just looks like numbers and letters and not in readable format?
thanks 
You can't really encrypt it and still get it run automatically. At best you can obscure it -- a temporary distraction easily bypassed, because your program by definition contains step-by-step instructions for decoding the encoded program.
Could you give an example of what you're trying to do?
There is a commercial PHP extension on the market that runs encrypted PHP code. The purpose of the engine is to decrypt PHP source code which has been encrypted to stop code modifications and copyright violations. There is an extension for this forum that uses this type of PHP source code extension, but we removed it a number of years ago.
That is not true. There is a PHP extension that encrypts source code and the decrypts it and runs the code, on the fly. The purpose of that package / extension is to encrypt PHP source code to prevent copyright violations and unauthorized code modifications.
EDIT: Check out this solution from ionCube.
thanks for the responses
i dont really understand how that works
is it a program
where you can put in the php code you want to encode
and it will output the encrypted code you can use into the php file instead?
are there any websites that do this?
and once the php code is encrypted, people can still run the code anywhere? like the code will be distributed to users and i dont want them to remove the copyright when they install it on their own hosting
thanks!
I was more wondering why the need for this thing. This will not prevent anyone from using your code, only from seeing what it does...
No that is also not correct; it is easy to put a license key in the PHP code (for the person who licensed it) and an encrypted key in a file can compare the two; and this technique is routinely used to insure only licensed code is running. Some systems also use crypto hash functions for IP address or other local tokens and add that token to the source code before encrypted and providing the code to the licensee so it only runs on a certain host, IP address, etc.
You can send a note to ionCube and ask them how their system works.
Or, you could write your own PHP extension (coder and decoder), if you like ![]()
so the copyright can't be removed easily
like it's not obvious in the php file where the copyright line is
since it will be jumbled up
Oh, I see -- so it prints a copyright message, but isn't visible in the code as such?
right 
i've seen something like gzip base 64 or something like that once for another script but i don't remember exactly what it looked like
because i remember there was an annoying ad code i was trying to remove but it was encrypted so i couldn't find it easily
base64_decode can turn base64 back into a string, with which you can do as you please. If you really wanted you could then feed it into eval or somesuch (which would process it as raw php code).
This page can convert text to base64.