PHP Classes

File: example_scramble.php

Recommend this page to a friend!
  Classes of Robert Amigura   Scramble Eggs   example_scramble.php   Download  
File: example_scramble.php
Role: Example script
Content type: text/plain
Description: example scramble
Class: Scramble Eggs
Scramble text adding fake characters
Author: By
Last change: updated to php 5
Date: 15 years ago
Size: 731 bytes
 

Contents

Class file image Download
<?php
/*
scramble and descramble values with fake text and numbers patterns
this is an alternative to encryption.

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

*/

include 'scramble_eggs.php';

// how much fake text to add
$len = '5';
// characters to use - numbers/letters
$charset ='2';
// where to add fake text
$pattern = '3';
// text to scramble
$realtext = 'scramble and descramble values with fake text and numbers patterns, this is so cool.';

// call class
$scramble_it = new scramble_text;

// output class

// scramble text
echo '<br><strong>Scrambled text</strong><br>';
$scramble_it->fake_text($realtext,$pattern,$charset,$len);
echo
$scramble_it->scrambled_val;

?>