<?php session_start(); ?>
<?php include("doppelme.php"); ?>
<?php
// This is just an simple example landing page.
// After a user has updated their avatar you would probably send them to their
// profile page rather than here
//your user's id (i.e. the id that your site uses to identify your user)
if(isset($_SESSION['UserID'])) {
$USER_ID = $_SESSION['UserID'];
} else {
//user hasnt logged in or session expired?
header( 'Location: http://[www.yoursite.com]/please_login.php' );
}
//Get avatar key from your database. (sql below is just example code)
/*
sSQL = "select DoppelMeKey from [YourUserTable] where UserID=" & $USER_ID
oRS.Open sSQL, oDB
$sDOPPELME_KEY = oRS("DoppelMeKey")
oRS.Close
*/
$sDOPPELME_KEY = $_SESSION['DoppelMeKey'];
//Avatar image
$sAVATAR = "http://www.doppelme.com/60/TRANSPARENT/" . $sDOPPELME_KEY . "/avatar.png";
$sAVATAR = "<img src=\"" . $sAVATAR . "\" alt=\"DoppelMe Avatar\">";
?>
<html>
<head>
</head>
<body>
<table style="width: 400px; margin: 0 auto; text-align:center;">
<tr><td><?php echo $sAVATAR; ?></td></tr>
<tr><td>Your avatar has been updated!</td></tr>
</table>
</body>
</html>