WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Class to Create protected URLs
Categories : PHP, PHP Classes, URLs Click here to Update Your Picture
Ben Yacoub Hatem
Date : Sep 28th 2004
Grade : 2 of 5 (graded 4 times)
Viewed : 6823
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Ben Yacoub Hatem
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

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