Location: PHPKode > scripts > PHP Mud Names > php-mud-names/index.php
<?php

require('./mudnames.php');

$file = (isset($_GET['f']) && !empty($_GET['f'])) ? $_GET['f'] : 'random' ;

$gname = new mudnames();

$name = $gname->generate_name_from($file);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<title>Mudnames-php</title>
	<link type="text/css" href="style.css" title="Main style" rel="stylesheet" />
</head>
<body>
<div id="main">
<p>This is a names generator for MUD. It's great when we're in a unimaginative day !</p>

Your generated name : <input type="text" value="<?php echo $name ?>" />

<h1>Tips :</h1>
<strong>File used :</strong> <?php echo $gname->get_info('file used') ?><br/>
<strong>Particles used :</strong> <?php print_r($gname->get_info('particles used')); ?><br/>
<strong>Capability used :</strong> <?php echo $gname->get_info('capability') . ($gname->get_info('is forced') ? ' -- <em>Forc&eacute;</em>' : ''); ?><br />
<strong>All possibilities of capacity :</strong> <?php echo $gname->get_info('capability_list'); ?>

<h1>Choose a file :</h1>
<ul>
<?php
foreach ($gname->get_file_list() as $namefile) {
	echo '<li><a href="'.$_SERVER['PHP_SELF'].'?f='.$namefile.'">'.$namefile.'</a></li>';
}
?>
</ul>
</div>
</body>
</html>
Return current item: PHP Mud Names