Encrypt php lines


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Encrypt php lines
# 1  
Old 04-19-2012
Encrypt php lines

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 Smilie
# 2  
Old 04-19-2012
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?
# 3  
Old 04-19-2012
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.
# 4  
Old 04-19-2012
Quote:
Originally Posted by Corona688
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.?
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.

Quote:
ionCube PHP Encoder

The ionCube PHP Encoder makes it easy to protect your PHP 4 & 5 source code from easy observation, theft and change. Plus, with PHP licensing features built into the Pro and Cerberus editions, licensing PHP scripts to control where your code runs is easy too, and you can even give your files a time expiry! Optional encryption of non-PHP code is also supported if required.

Available in three editions, Basic (entry level), Pro and Cerberus, all ionCube PHP Encoder editions offer bytecode PHP encoding plus optional encryption of non-PHP files. Pro and Cerberus also include optional PHP licensing features for time expiry and restricting where code can be used, allowing licensing models to be effectively and easily implemented.

The PHP Encoder is available for Windows, Linux, FreeBSD and Intel OS X. All versions offer command line access for encoding, and also for creating license files using Pro or Cerberus. This feature is ideal if you wish to automate processing. The Windows Encoder also includes an easy to use GUI, and the Windows Pro and Cerberus editions include a Linux based license generator for PHP scripts too, allowing scripts to be protected using Windows and creating license files from a Linux based web server.

ionCube Encoded files run on a wide range of operating systems such as Linux, Windows, FreeBSD and others.
This User Gave Thanks to Neo For This Post:
# 5  
Old 04-20-2012
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!
# 6  
Old 04-20-2012
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...
# 7  
Old 04-20-2012
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Encrypt script

Hi, I have to encrypt my ash scripts on a distribution of linux with Armv5tejl Buildroot , I tried a lot of solutions but none works . Someone can help me? Thanks, Nicola (7 Replies)
Discussion started by: n.rito
7 Replies

2. Shell Programming and Scripting

Encrypt and Decrypt

I have script for all oracle prod db. I have hard coded the username / password. I need a mechanism to encode and decode the username / password in a shell script. Another challenge is I use the username and password in a Select command for oracle DB. How can call the decrypted... (2 Replies)
Discussion started by: ilugopal
2 Replies

3. Shell Programming and Scripting

Need help with file encrypt

Hi I need to encrypt the below file using the translate command to shift each letter five characters to the end of the character set. ALPHABETICAL FACTS. THE FIRST THREE LETTERS ARE ABC. THE MEDIAN LETTERS ARE MN. THE LAST THREE LETTERS ARE XYZ. THE FIRST WORD IN MY DISCTIONARY IS AAL. THE... (1 Reply)
Discussion started by: drew211
1 Replies

4. Shell Programming and Scripting

How to Encrypt password

Hello, I have a paramter file, In which I store all the user-ids and passwords for the project. So if a user just invokes the paramter file he has access to all the variables, which i have exported in the parmatere file. Now if a user echo's the variable which stores the databse password.... (1 Reply)
Discussion started by: DSDexter
1 Replies

5. Shell Programming and Scripting

need encrypt form

Hi, i need to encrypt and decrypt of a string. pls provide me some syntax or any method available using shell script. i know one method i.e., perl -e 'print pack "H*","message"' so if perl command doesnt work then what is the other method to encrypt and decrypt. Thanks in advance. (0 Replies)
Discussion started by: syamkp
0 Replies

6. Shell Programming and Scripting

encrypt my sctipt

Hai , is there any encrypt machanishm to protect my script or logic? (4 Replies)
Discussion started by: readycpbala
4 Replies

7. Solaris

encrypt file

dear all i have xml file on solaris contains password for the databse how can i encrypt the password but the apache can read the password after encrypt it or if any one have any idea to make no one can read the password except apache (1 Reply)
Discussion started by: murad.jaber
1 Replies

8. Shell Programming and Scripting

Tr utility to Encrypt

I need some help.. I would like to make a script that uses the tr utility to "encrypt" a selected file. I need to know how to set up the script so that if i type encrypt(script name) the letter that i want to start the encryption and then the file name, that it starts with the entered letter, and... (1 Reply)
Discussion started by: frankthetank115
1 Replies

9. Programming

Help with encrypt function

Hi there, I need to include a simple encryption function in a C program and I came across this function void encrypt(char block, int edflag) whic is defined in #include des_crypt.h. According the man "the block argument to encrypt() is a character array of length 64 containing only the... (1 Reply)
Discussion started by: giggi
1 Replies
Login or Register to Ask a Question