base64_decode

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!

Moderator: General Moderators

Post Reply
StaceE
Forum Newbie
Posts: 1
Joined: Wed Jan 12, 2005 5:40 am

base64_decode

Post by StaceE »

Hello,
I need a little help with a coding problem..
I started this script and what I want to do is..

include a small file from one domain..
a php file that will make a table in a mysql database...
insert some data from the file that it is "including" and carry on..
but I have never used the base64_decode before..
or the include for that matter.. but it just seemed like the best way to do it..

Basically it is my copyright information that I want to include..
but I want to make it so it inserts my info.. from my domain so I can control what it says...

I also want to encode it so as not to be easily removed..

am I on the right track...

{ $upd = @file(base64_decode("('THIS IS WHERE I NEED HELP==")


Thanks ahead of time...
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

BTW, base64_encode/decode is no form of encryption/decryption, so anyone can decode your encoded code.
Basically it is my copyright information that I want to include..
Use mcrypt functions instead. You can provide a key which makes it impossible (DIFFICULT ?) to hack.

Code: Select all

$a="devnet";
$e=base64_encode($a);
$d=base64_decode($e);
echo $e."<BR>";
echo $d."<BR>";
outputs:
ZGV2bmV0
devnet
Endimion
Forum Newbie
Posts: 15
Joined: Fri Feb 18, 2005 9:48 am

Post by Endimion »

Is mcrypt available in common php installations by default?

One thing that is funny:

Encrypted code files will only make users want to decode it, if the file is a normal php coded the users get bored and dont look at it again, hehe :lol:
hongco
Forum Contributor
Posts: 186
Joined: Sun Feb 20, 2005 2:49 pm

Post by hongco »

right now, the only way I could think of is to use zend encoding or iconcube. The rest is useless for your purpose.
Post Reply