This class is meant to create protected URLs like <a href=http://domain.com/?p=YToyOntzOjI6ImlkIjtpOjQ7czo1OiJ1bmFtZSI7czo0OiJ0ZXN0Ijt9fHNkMWxzM2VydGV0cmV0>User id=4, name=test</a>. Sample usage of the class :
@author Ben Yacoub Hatem <hatem@php.net>
$ version 1.0.0 Tue Sep 28 14:55:15 CEST 2004 14:55:15 by hatem
<?php
class urlz {
var $_secret = "sd1ls34ml5kgd&ééàç__)àç_" ;
function urlz () {
}
function encode ( $arr ){
$serialized = serialize ( $arr );
return base64_encode ( " $serialized |" . $this -> _secret );
}
function decode ( $s ){
$l = base64_decode ( $s );
$serialized = str_replace ( "|" . $this -> _secret , "" , $l );
return unserialize ( $serialized );
}
}
?>
Usage Example
<?php
$s = new urlz ;
$params = array( "id" => 4 , "uname" => "test" );
echo "<a href=?p=" . $s -> encode ( $params ). ">User id=4, name=test</a><br>" ;
if (isset( $_GET [ 'p' ])) {
echo "<pre>" ; print_r ( $s -> decode ( $p ));
}
?>
PHP5 URL Object Categories : PHP , PHP Classes , URLs , Strings SubmitForce URL power submitter (searchengine submission class) Categories : PHP , Search Engines , URLs , PHP Classes Gonx URLs - This class is meant to generate URLs for accessing application dynamically generated pages based on parameters passed in the URL.
Categories : PHP , PHP Classes , Navigation , URLs Class TStringList include some metods from class TStringList
implemented in INPRISE/BORLAND-DELPHI Categories : PHP Classes , PHP , Strings Email Class Categories : PHP , Mail , PHP Classes Simple class to create insert and update statements. Independent of the access to the database. Makes handling complex inserts easier - especially when the table structure is liable to change. Categories : Databases , PHP Classes , PHP Link Manager for Link Exchangers Categories : PHP , PHP Classes , Databases , MySQL , CURL Simple class that uses GD to draw pie charts. After the class definition there's some sample code to demonstrate how you use the class.
Categories : Graphics , PHP , PHP Classes , GD image library , Charts and Graphs PHPDRAW, the php wannabe Photoshop ;-) Categories : PHP , PHP Classes , GD image library , Arrays XML To Array Categories : PHP , PHP Classes , XML , Arrays PHP4 DirectoryIterator Class Categories : PHP , PHP Classes , Filesystem , Directories MySQL Handler Categories : PHP , Databases , MySQL , Classes and Objects , PHP Classes Export Excel Dynamically to Csv then to mysql Categories : PHP Classes , Excel , PHP Image Cache Categories : Graphics , PHP Classes , PHP Simple Mini Poll class library (SimPoll) Categories : PHP , PHP Classes , Databases , MySQL , Complete Programs