Location: PHPKode > scripts > Encoding Sessions > encoding-sessions/example.txt
<?php
/* 
base64 with encryption - base64 encode and decode sessions

author:  Amigura
website: http://www.amigura.co.uk/
*/ 

session_start();
include 'enc64_session.php';

// call class
$encode_it = new encode_session;
// output class 

// sessions to set and value
$set_ses = array('value1'=> 9,'value2'=> 34);

// encoded session
echo '<br>encoded session<br>';
$encode_it->encode($set_ses,$ky);
echo $encode_it->$enc_val; 


// decoded session individual key
$get_ses = 'value1'; // session key name

echo '<br>decoded session<br>';
$encode_it->decode($get_ses,$ky);
echo $get_ses.' = '.$encode_it->$dec_val; 

?>
Return current item: Encoding Sessions