note 9028 modified in base64_decode by jmcastagnetto

From: Date: Thu, 12 Oct 2000 21:03:03 +0000
Subject: note 9028 modified in base64_decode by jmcastagnetto
Groups: php.notes 
Request: Send a blank email to php-notes+get-6413@lists.php.net to get a copy of this message
[Editor's note: This solution does not afford any degree of security over the plain text, because if someone can read the source code of the script containing the encoded, it is not difficult to just decode the base64 string and get back the clear text information. Use this tip under your own risk.] Hello. I am Calin from Romania. Here is a way to try to hide the user/pass or smth from immediate: <? $username = "loosername"; $userpass = "nopassword"; echo "<br> <font face=arial size=2>encoded username ". base64_encode($username); echo "<br> encoded userpass ". base64_encode($userpass); // after cut & paste from browser $username = base64_decode("bG9vc2VybmFtZQ=="); $userpass = base64_decode("bm9wYXNzd29yZA=="); echo "<br> .. after decrypt"; echo "<br> username <b>".$username; echo "</b><br> userpass <b>". $userpass; /* $db = new MySQL ; $db->init(); ... */ ?> http://www.php.net/manual/function.base64-decode.php

« previous php.notes (#6413) next »