Salva questa pagina con estensione PHP:
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Immagine nick Habbo</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
<body>
<h1>Immagine nick Habbo</h1>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
Inserisci il tuo nick: <input type="text" name="nick" />
<input type="submit" name="submit" value="Invia" />
</form>
<?php
if(isset($_POST['submit']))
{
if($_POST['nick'] == '')
echo 'Devi inserire un nick valido.';
else
echo '<a href="http://habbo.it/home/'. $_POST['nick'] .'" target="_blank"><img src="http://www.habbo.it/habbo-imaging/avatarimage?user='. $_POST['nick'] .'&action=std&direction=2999995&head_direction=2999987&gesture=sml&size=l" border="0"></a>';
}
?>
</body>
</html>
Testato e funzionante.