Location: PHPKode > projects > MyBlog: PHP and MySQL Blog/CMS software > os/files/mf_avatar.php
<?php
$person = $_COOKIE['login'];
$current = file_get_contents("../" . $person . "_extras.txt");
$content = "<img src=\"" . $_GET['file'] . "\" /><br />";


if ($current != $content) {
$file = "../" . $person . "_extras.txt";
$file1h = fopen($file, 'w') or die("can't open file");


fwrite($file1h, $content);
fclose($file1h);
echo "You now have a custom avatar!";
}

else {
echo "You already have this avatar!";
}
?>
Return current item: MyBlog: PHP and MySQL Blog/CMS software