PHP Classes

File: signature.php

Recommend this page to a friend!
  Classes of Lopo Lencastre de Almeida   Signature   signature.php   Download  
File: signature.php
Role: Example script
Content type: text/plain
Description: Example of usage. Check code due to location of your PEAR packages.
Class: Signature
Generate signatures that identify the current user
Author: By
Last change: Added donation link to headers and in html output.
Date: 13 years ago
Size: 1,543 bytes


Class file image Download
    * Simple and easy secure encrypted unique signature
    * Basically this algorithm provides a unique signature for a specific visitor
    * @requirements PHP 5.x, PEAR Crypt HMAC, PEAR Net User Agent
    * @author Lopo Lencastre de Almeida, iPublicis - Internet Agency, Portugal <>
    * @copyright Copyright 2008 Lopo Lencastre de Almeida, iPublicis - Internet Agency, Portugal
    * @version Version 1.0, first public release
    * @license GNU Lesser General Public License v3
    * @package signature sample
    * @donation

    // Include Pear HMAC2 package
    /* require_once ('PEAR/Crypt/HMAC2.php'); */
require_once ('./Crypt/HMAC2.php');

// Include Pear Net_UserAgent_Detect package
    /* require_once ('PEAR/Net_UserAgent/Detect.php'); */
require_once ('./Net_UserAgent/Detect.php');

// Include class file
require_once 'class.signature.php';

// Instantiate new signature object
$sign = new signature();

// Create new signature
$signature = $sign->create();

        <title>Example usage of class.signature.php</title>
    <h1>Your signature:</h1>
// Output the value
echo " <h3>".$signature."</h3>";
<small>Help us. <a href="">Donate now</a>. Anything will be welcomed!</small>