echo "<!-- Powered by MWhois written by Matt Wilson <matt@mattsscripts.co.uk> -->\\n\";
/*
#########################################################################################
# #
# 本域名查询体系由mydowns搜集收拾整顿汉化,汉化归掌控工夫网站一切(http://www.85time.com) #
# 该法式是2001年5月18日宣布的最新版本,本站将对此法式持续停止修正完美,敬请存眷本站! #
# 该法式可以查询域名一切者的具体材料信息,现供应9个类型的域名以供查询! #
# 演示地址:http://www.85time.com/whois #
# 源法式打包下载:http://www.85time.com/mydowns/mydowns.php?id=378 #
# 掌控工夫网站供应PHP、ASP、CGI、HTML、JSP等源法式、电子教材、文章材料 #
# 掌控工夫网站http://www.85time.com 掌控工夫服装论坛http://ww.85time.ent #
# 请保存此信息,感谢! #
# #
#########################################################################################
MWhois - a Whois lookup script written in PHP and Perl
Copyright (C) 2000 Matt Wilson
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
*/
if(!isset($use_global_templates))
$use_global_templates = 1; // whether to use the global templates
$template_header = \"gheader.tml\"; // the global header template
$template_footer = \"gfooter.tml\"; // the global footer template
/* Template information stuff
----------------------------
The following strings in your templates are replaced with the description;
[>DOMAIN<] = domain searching for
[>RAWOUTPUT<] = the raw output of the whois query
[>WHOIS_SERVER<] = the whois server used
[>AVAIL_LIST<] = a list of the available domains (in global/wizard search mode)
[>UNAVAIL_LIST<] = a list of the unavailable domains (in global/wizard search mode)
[>ERROR_MSG<] = the error message produced
[>EXT<] = the extension if it is set
[>EXT_HTML_LIST<] = a list of the extensions supported in a html list
[>EXT_LIST<] = a list of extensions supported
parameters to the script (no parameters brings up normal search script);
show_raw=1 = wherther to show the raw output page
do_wizard=1 = whether the information being passed is for the wizard
domain=(string) = do a search for the domain (string)
list_exts=1 = show the extensions supported page
do_global=1 = goto the global search page
do_mini_search=1 = just show the search form without anything else
company=(string) = used for the wizard, needed in order to search
keyword1=(string) = used for the wizard, needed in order to search
keyword2=(string) = used for the wizard, needed in order to search
If any of this is unclear, see the provided example templates
*/
$template_search_mini = \"searchform.tml\"; // search template
$template_search = \"searchmain.tml\";
$template_raw_output = \"rawoutput.tml\"; // raw output template
$template_available = \"isavail.tml\"; // template for available
$template_taken = \"istaken.tml\"; // template for taken
$template_wizard = \"wizard.tml\"; // template for the domain wizard
$template_wizard_results = \"wizardres.tml\"; // the output template for the domain wizard
$template_error = \"error.tml\"; // the template in case of error
$template_exts_list = \"exts_list.tml\";
$template_global = \"global.tml\";
$template_global_results = \"globres.tml\";
$search_title = \"Let Floyd find your domain name\";
$raw_output_title = \"Floyd\'s Raw WHOIS Output\";
$available_title = \"Floyd says Domain Name Available!\";
$taken_title = \"Floyd says Doman Name in use\";
$wizard_title = \"Floyd the Domain Name Wizard\";
$error_title = \"Floyd Encountered an Error!\";
$exts_list_title = \"Floyd supports the following extensions\";
$global_title = \"Let Floyd do the hard work!\";
// the extensions that we are going to be using, edit these for your needs
$whois_exts = array(
\"com\",
\"net\",
\"org\",
\"com.cn\",
\"net.cn\",
\"org.cn\",
\"gov.cn\",
\"sh\",
\"cc\"
);
// some extensions (com/net/org) have a server which contains the name of the server which should be used for
the information, this simply tells the script to use the whois server as a source for the server info... ;)
$whois_si_servers = array();
// an array of the `whois\' servers
$whois_servers = array();
// default whois servers for info
$whois_info_servers = array();
// the backup whois servers to try
$whois_info_servers_backup = array();
// the strings that are returned if the domain is available
$whois_avail_strings = array();
// some substitution strings follow
$errormsg = \"\";
$titlebar = \"MWhois written by Matt Wilson\"; // the defatul title bar
$rawoutput = \"\";
$avail = array();
$unavail = array();
$whois_server = \"\";
// the name of the script
$script_name = \"index.php\";
// this loads the server info for the extensions in $whois_exts;
function load_server_info()
{
global $whois_exts;
global $whois_si_servers;
global $whois_servers;
global $whois_info_servers;
global $whois_info_servers_backup;
global $whois_avail_strings;
// load the servers.lst file
$tlds = file(\"servers.lst\");
for($l=0; $l<sizeof($tlds); $l++){
// time leading spaces or trailing spaces
$tlds[$l] = chop($tlds[$l]);
// filter out the commented lines (begin with #)
if(substr($tlds[$l], 0, 1) == \"#\" || !strlen($tlds[$l])) { continue; }
// explode via the seperation char `|\'
$es = explode(\"|\", $tlds[$l]);
// check to see whether we want this TLD
if(!my_in_array($es[0], $whois_exts)) { continue; }
// yes we do, so store the details in the appropriate arrays
$whois_servers[$es[0]] = $es[1];
$whois_si_servers[$es[0]] = $es[5];
$whois_info_servers[$es[0]] = $es[3];
$whois_info_servers_backup[$es[0]] = $es[4];
$whois_avail_strings[$es[1]] = $es[2];
// thats it!
}
}
function choose_info_server($domain, $ext)
{
global $whois_info_servers;
global $whois_si_servers;
global $whois_server;
global $whois_servers;
$whois_server = \"\";
if($whois_si_servers[$ext]){
if(($co = fsockopen($whois_servers[$ext], 43)) == false){
echo \"<!-- choose_info_server() : unable to connect to \".$whois_servers[$ext].\" @ line
#\".$__LINE__.\" -->\\n\";
$whois_server = $whois_servers[$ext];
} else {
echo \"<!-- choose_info_servers() : connected to \".$whois_servers[$ext].\" @ line
using for whois info server -->\\n\";
}
} else {
$whois_server = $whois_info_servers[$ext];
}
$whois_server = trim($whois_server);
}
// make all the changes
function make_changes($fil)
{
global $domain;
global $errormsg;
global $titlebar;
global $rawoutput;
global $avail;
global $unavail;
global $ext;
global $whois_exts;
global $whois_servers;
global $script_name;
// show the error page
function do_error()
{
global $use_global_templates;
global $template_header;
global $template_footer;
global $template_error;
global $domain;
global $titlebar;
global $error_title;
global $errormsg;
// perform_whois function returns 0 if domain is available otherwise returns either the raw info or 1
function perform_whois($domainname,$ext,$raw)
{
global $errormsg;
global $whois_servers;
global $rawoutput;
global $whois_avail_strings;
// this performs the whois lookup and then shows the data returned
function do_raw($domainname, $ext)
{
global $titlebar;
global $template_raw_output;
global $use_global_templates;
global $template_header;
global $template_footer;
global $raw_output_title;
global $whois_info_servers;
global $whois_servers;
global $rawoutput;
global $errormsg;
global $whois_info_servers_backup;
global $whois_avail_strings;
global $whois_server;
function do_getsearch_mini()
{
global $template_search_mini;
echo make_changes($template_search_mini);
exit();
}
function do_getsearch()
{
global $template_footer;
global $template_header;
global $use_global_templates;
global $titlebar;
global $template_search;
global $search_title;
function do_avail()
{
global $template_footer;
global $template_header;
global $use_global_templates;
global $titlebar;
global $template_available;
global $available_title;
function do_taken()
{
global $template_footer;
global $template_header;
global $use_global_templates;
global $template_taken;
global $titlebar;
global $taken_title;
function do_exts()
{
global $template_footer;
global $template_header;
global $use_global_templates;
global $template_exts_list;
global $titlebar;
global $exts_list_title;
function do_glob()
{
global $domain;
global $whois_exts;
global $avail;
global $unavail;
global $template_header;
global $template_footer;
global $use_global_templates;
global $titlebar;
global $global_title;
function do_wiz()
{
global $domain;
global $ext;
global $avail;
global $unavail;
global $template_header;
global $template_footer;
global $use_global_templates;
global $titlebar;
global $wizard_title;
global $errormsg;
global $keyword1;
global $keyword2;
global $company;