|
|
|
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));
}
?> | | |
|
| SubmitForce URL power submitter (searchengine submission class) Categories : PHP, Search Engines, URLs, PHP Classes | | | PHP5 URL Object Categories : PHP, PHP Classes, URLs, Strings | | | 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 | | | file class , uploade file , download file already uploaded on another website Categories : PHP, PHP Classes, Filesystem, Web Services | | | Authorize.net AIM Interface Class v1.0.0 Categories : PHP, PHP Classes, Ecommerce, Payment Gateways | | | crop and resize image class using gd library function Categories : PHP, PHP Classes, GD image library, Graphics | | | News management class Categories : PHP, PHP Classes, Beginner Guides | | | A Timing Class Categories : PHP, PHP Classes, Date Time | | | The class to check load time of your script
VERY usefull for relatively slow applications, but not only.. Categories : PHP, PHP Classes, Debugging | | | Expose - PHP template engine, supports server and client-sided caching,a plugin system, multiple languages, template script language is based on PHP itself. Categories : PHP, PHP Classes, Templates, Complete Programs | | | RSS parser.
Parses RSS into an array. Quick and nasty but does the job.
No checking is done for correct Tags, only correct XML.
PHP4 needed to display result (uses print_r). Categories : PHP, XML, PHP Classes, Rich Site Summary (RSS) | | | MS Word Mail Merge Automation (COM) Categories : PHP, PHP Classes, COM | | | php jump urls...the best way Categories : PHP, URLs, Filesystem | | | Password Creator: This PHP code exmaple shows how to use bitwise operations on a single variable and using it as a flagged variable. The class generates passwords of a given length using specified characters and the flags. Categories : PHP, PHP Classes, Algorithms, Security | | | an example of the cyberlib payment class Categories : PHP, PHP Classes, Ecommerce, Credit Cards | |
|
|
|