codice:
<?php
/*
	MRWhois Lite v. 2.2 - a Whois lookup script written in PHP.
	Copyright (C) 2001-2006 Marek Rozanski
	http://www.mrscripts.co.uk

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

	// change it here - if you changed the file name from mrwhois.php to something else

	define('FILE_NAME',					'mrwhois.php');

	// Language settings

	define('PAGE_TITLE_META', 			'MRWhois v. 2.2');			// Title to be used in META tag within HEADER
	define('POWERED_BY',				'Powered by MRWhois');			// Text to display in a footer, please do not change if you don't have to

	define('MAIN_COMMAND', 				'Please enter a suggested domain name');	// Command in a main window
	define('CHECK_BUTTON', 				'Check');									// Check button text
	define('META_CHARSET',				'iso-8859-1');								// Charset to be used in META tags
	define('META_LANGUAGE',				'en');										// Language to be used in META tags

	define('FOOTER_TEXT', 				'Please wait for the answer - 
										 due to whois servers overload it may take a while to lookup all names.
										 Sometimes you may need to reload the page and repeat lookup.');				// text in footer
	define('FOOTER_RELOAD_TEXT',		'Reload');					// text of the link to reload the page

	// This is an extra layer displayed during domain search. It is helpfull when someone is
	// searching for all domains at once.
	// If you are not confident with layers at all
	// just disable it - set the first value below to false.

	define('WAIT_LAYER_ENABLED',		true);
	define('WAIT_TITLE',				'Please wait...');
	define('WAIT_MESSAGE',				'If the lookup takes too long (more than a minute), click here to reload the page and try again.');

	define('LINK_REGISTER_TEXT',		'Register');						// Register link text
	define('STATUS_BAR_REGISTER_TEXT',	'Register');						// Status bar register message - when hovered over the "Register" link
	define('STATUS_BAR_DETAILS',		'Details of');						// Status bar "Details of" - when hovered over "Details" link
	define('LINK_TAKEN_DETAILS',		'Details');							// "Details" text
	define('LINK_TAKEN_GOTO',			'Goto');						// "Goto" text

	define('ALL_TEXT',					'all');						// Text to display for all domains checking
	define('CLOSE_BUTTON_TEXT',			'Close window');					// "Close" button text in a details window
	define('AVAILABLE_TEXT',			'Available');						// Text displayed if the domain is available
	define('NOT_AVAILABLE_TEXT',		'Taken');						// Text displayed if the domain is not available

	define('ERROR_TOO_SHORT',			'The domain name you typed is too short - it must contain minimum 3 characters'); 			// Error message if the domain name is too short
	define('ERROR_TOO_LONG',			'The domain name you typed is too long - it may contain maximum 63 characters');		// Error message if the domain name is too long
	define('ERROR_HYPHEN',				'Domain names cannot begin or end with a hyphen or contain double hyphens');			// Error message if the domain starts with hyphen or contains double hyphen
	define('ERROR_CHARACTERS',			'Domain names can only contain alphanumerical characters and hyphens');								// Error message if the domain contains other characters than letters, digits or hyphens

	// DESIGN PARAMETERS
	
	define('MAIN_STYLE','
			BODY {
				background-color: 	#ffffff;
				color: 				#000000;
				font-family: 		"Verdana, Arial, Helvetica";
				font-size: 			12px;
			}
			TD {
				color: 				#000000;
				font-family: 		"Verdana, Arial, Helvetica";
				font-size: 			12px;
			}
			
			.available {
				color: 				#006600;
				font-family: 		"Verdana, Arial, Helvetica";
				font-size: 			12px;
			}
			
			.notavailable {
				color: 				#FF0000;
				font-family: 		"Verdana, Arial, Helvetica";
				font-size: 			12px;
			}
			.separator {
				background-color:	#dddddd;
			}
			.footer {
				color: 				#000080;
				font-family: 		"Verdana, Arial, Helvetica";
				font-size: 			10px;
			}
			.windowborder {
				background-color:	#cccccc;
			}
			.windowinside {
				background-color:	#eeeeee;
			}
			.errors {
				color: 				#FF0000;
				font-family: 		"Verdana, Arial, Helvetica";
				font-size: 			12px;
			}
			A {
				font-family: 		"Verdana, Arial, Helvetica";
				font-size: 			12px;
				color:				#000000;
				text-decoration:	none;
			}
			A:hover {
				font-family: 		"Verdana, Arial, Helvetica";
				font-size: 			12px;
				color:				#FF0000;
				text-decoration:	underline;
			}
			A.footer {
				font-family: 		"Verdana, Arial, Helvetica";
				color: 				#FF0000;
				text-decoration: 	none;
				font-size:			10px;
			}
			A.footer:hover {
				font-family: 		"Verdana, Arial, Helvetica";
				color:				#FF0000;
				text-decoration: 	underline;
				font-size:			10px;
			}
			A.footerreload {
				font-family: 		"Verdana, Arial, Helvetica";
				color: 				#FF0000;
				text-decoration: 	none;
				font-size:			12px;
			}
			A.footerreload:hover {
				font-family: 		"Verdana, Arial, Helvetica";
				color:				#FF0000;
				text-decoration: 	underline;
				font-size:			12px;
			}
			A.footerpowered {
				font-family: 		"Verdana, Arial, Helvetica";
				color: 				#000000;
				text-decoration: 	none;
				font-size:			10px;
			}
			A.footerpowered:hover {
				font-family: 		"Verdana, Arial, Helvetica";
				color:				#FF0000;
				text-decoration: 	underline;
				font-size:			10px;
			}
			



		  ');		// change it to whatever you like

	// Define lookup variables

	// .com domains
	define('COM_SERVER', 	"rs.internic.net");			// server to lookup for domain name
	define('COM_NOMATCH',	"No match");							// string returned by server if the domain is not found
	define('COM_INCLUDE',	true);									// include this domain in lookup

	// .net domains
	define('NET_SERVER', 	"rs.internic.net");			// server to lookup for domain name
	define('NET_NOMATCH',	"No match");							// string returned by server if the domain is not found
	define('NET_INCLUDE',	true);									// include this domain in lookup

	// .org domains
	define('ORG_SERVER',	'whois.publicinterestregistry.net');	// server to lookup for domain name
	define('ORG_NOMATCH',	'NOT FOUND');								// string returned by server if the domain is not found
	define('ORG_INCLUDE',	true);									// include this domain in lookup

	// .info domains
	define('INFO_SERVER',	'whois.afilias.net');					// server to lookup for domain name
	define('INFO_NOMATCH',	'Not found');							// string returned by server if the domain is not found
	define('INFO_INCLUDE',	true);									// include this domain in lookup

	// .it domains
	define('IT_SERVER',	'whois.nic.it');						// server to lookup for domain name
	define('IT_NOMATCH',	'Not found');							// string returned by server if the domain is not found
	define('IT_INCLUDE',	true);									// include this domain in lookup

	// Shall we use register link? (true/false)
	define('REG_LINK',	true);
	// If yes, give the url, it can be your affiliate link
	define('REG_URL',	'http://www.123-reg.co.uk/affiliate.cgi?id=AF8763');

	// Do you want a log file? (true/false)
	define('WANTLOG',	false);
	// If yes, give the log file name here
	// remember to chmod the file to 777 (change permition to writable for everyone)
	define('LOGFILE',	'mrwhois.log');


/* 
	#################################################################################################################
	End of variables, you do not need to change anythin below this line.
	#################################################################################################################
*/ 


	if ($_POST['type']!="") define('TYPE', $_POST['type']); else define('TYPE', '');
	if ($_POST['ddomain']!="") define('DDOMAIN', $_POST['ddomain']); else define('DDOMAIN', '');

	// This function displays an available domain
	function dispav($what)
	{
		echo '<tr><td nowrap align="center">';
		if (REG_LINK)
		{
			echo ''.LINK_REGISTER_TEXT.'';
		}
		else
			echo '';
		echo '</td>
		<td nowrap align="center" class="available">'.$what.'</td><td colspan=3></td></tr>';
   }

   // Function to display an unavailable domain with additional links
   function dispun($what,$where)
   {
      echo '<tr>
	  			<td colspan="2"></td>
	            <td align="center" nowrap class="notavailable">'.$what.'</td>
            <td nowrap align="center">
			<a href="'.FILE_NAME.'?action=details&ddomain='.$what.'&server='.$where.'" onMouseOver="window.status=\''.STATUS_BAR_DETAILS.' '.$what.'\';return true" onMouseOut="window.status=\'\';return true" onClick="NewWindow(this.href,\'details\',\'620\',\'400\',\'yes\');return false;">
			'.LINK_TAKEN_DETAILS.'</a></td>
            <td nowrap align="center">'.LINK_TAKEN_GOTO.'</td>
            </tr>';
   }

   function startborder()
   {
      echo '<table align="center" width="600" border="0" cellspacing="0" cellpadding="0">
            <tr><td width="100%" class="windowborder">
            <table width="600" border="0" cellspacing="1" cellpadding="2">
            <tr><td class="windowinside">';
   }


   function endborder()
   {
      echo '</td></tr></table></td></tr></table>';
   }

   function disperror($text)
   {
      startborder();
      echo '<center><b class="errors">'.$text.'[/b]</center>';
      endborder();
   }
continua...