When developing web applications sometimes we encounter situations where we need to encrypt/decrypt url or some code or some information. For such situations I wrote a simple php script using the default php functions:
base64_encode()
base64_decode()
Now the use of these functions is quite simple. For example if you want to pass some critical information like password in the url like:
Example:
Encode:- http://www.abc.com/abc.php?param0=<?php echo base64_encode('blog'); ?>
Example:
<?php
$param0 = $_REQUEST['param0
echo base64_decode(
?>
base64_encode()
base64_decode()
Now the use of these functions is quite simple. For example if you want to pass some critical information like password in the url like:
Example:
Encode:- http://www.abc.com/abc.php?param0=<?php echo base64_encode('blog'); ?>
Example:
<?php
$param0 = $_REQUEST['param0
'];
echo base64_decode(
$param0
);?>
No comments:
Post a Comment