<?php
echo "test ".random(10,20);
//This is your user object, the avatar is optional
$user = array(
"id" => 1154,
"username" => "JohnIDoe",
"email" => "[email protected]",
"avatar"=> "http://didine66.d.i.pic.centerblog.net/e1d055e5.gif");
//Your secret key
$secret = "8b1a9859c46412s6pp27qbg8d27404d7";
//This is how you sign the user oject
$timestamp = time();
$message = base64_encode(json_encode($user));
$hmac = hash_hmac('sha1', "$message $timestamp", $secret);
//Create a string with encoded object, signature and timestamp
$userData = $message."|".$timestamp."|".$hmac;
?>