|
|
|
|
Like this code?
Show the author your appreciation.
|
|
| |
This is a php class that can be used to encode and decode session values to make it harder to obtain private session values for people with access to session data.
It uses base64 encoding and mcrypt_encrypt encryption to set the values of one or more session variables values.
It can be easley modified to work with other varibles.
|
<?php
/*
base64 with encryption - base64 encode and decode sessions
author: Amigura
website: LINK1http://www.amigura.co.uk/LINK1
*/
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;
?> | | |
|
| A beginner's session handling class Categories : PHP, PHP Classes, Sessions, Beginner Guides | | | Optimized Online users class Categories : PHP, PHP Classes, Sessions | | | Scramble Eggs - php class to scramble/encode Categories : PHP, PHP Classes, Security, Encryption | | | SPL and ITERATOR : examples Categories : PHP, Object Oriented, PHP Classes, Sessions | | | MySQL database class Categories : PHP, MySQL, Databases, PHP Classes | | | PHP MIME Decoder. This class decodes Mime Encoded email message.
Attachments are stored in a director. Works with Multipart/alternative,
multipart/mixed etc.
see http://p3mail.com for example. Categories : PHP, PHP Classes, Email | | | A very basic and fast XML parser Categories : PHP, PHP Classes, XML | | | Generate FDF files without the pdftk library or php extension. Categories : PHP, PHP Classes, PDF | | | ClassFuncDoc - This script is a classes and functions documentation tool. Categories : PHP, Classes and Objects, Documentation, PHP Classes, Complete Programs | | | Tweak Array, insert/add elements to any position of your arrays - delete elements from your arrays - move elements within your arrays - replace elements from your arrays ... the array, 'dynamically' grows or shrinks to whatever we tweak it. Categories : PHP Classes, Arrays, PHP | | | PHP Based Apache + Mysql Error Log Parser Categories : PHP, PHP Classes, Apache, MySQL, Log Files | | | Validator - A PHP class that can can be used for validating Email IDs and Dates Categories : PHP, PHP Classes, Data Validation, Email, Date Time | | | Class: Info on Users, Servers and the running script Categories : PHP, Classes and Objects, User Interface, PHP Classes | | | Ajax PHP Tree (Left and Right) with MySQL Categories : PHP, Databases, MySQL, AJAX, PHP Classes | | | YellowPages Content Grabber (PHP5 +) Categories : PHP, PHP Classes, Regexps, Databases, MySQL | |
|
|