-->\n"; /* MWhois - a Whois lookup script written in PHP3 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", "edu", "fr", "tm.fr", "com.fr", "co.uk", "org.uk", "ltd.uk", "plc.uk", "cc", "be", "de", "ru", "com.ru", "org.ru", "net.ru" ); /* I realise that people are going to call me {stupid,lame,strange,weird,etc} for hard coding these but it was kinda helpful at the start and makes the script quicker for doing many domains at once... ;) */ // 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( "com" => "Whois Server: ", "net" => "Whois Server: ", "org" => "Whois Server: " ); // an array of the `whois' servers $whois_servers = array( "com" => "whois.crsnic.net", "net" => "whois.crsnic.net", "org" => "whois.crsnic.net", "co.uk" => "whois.nic.uk", "org.uk" => "whois.nic.uk", "ltd.uk" => "whois.nic.uk", "plc.uk" => "whois.nic.uk", "edu" => "whois.internic.net", "mil" => "whois.internic.net", "br.com" => "whois.centralnic.com", "cn.com" => "whois.centralnic.com", "eu.com" => "whois.centralnic.com", "hu.com" => "whois.centralnic.com", "no.com" => "whois.centralnic.com", "qc.com" => "whois.centralnic.com", "sa.com" => "whois.centralnic.com", "se.com" => "whois.centralnic.com", "se.net" => "whois.centralnic.com", "us.com" => "whois.centralnic.com", "uy.com" => "whois.centralnic.com", "za.com" => "whois.centralnic.com", "ac" => "whois.ripe.net", "ac.ac" => "whois.ripe.net", "co.ac" => "whois.ripe.net", "gv.ac" => "whois.ripe.net", "or.ac" => "whois.ripe.net", "af" => "whois.netnames.net", "am" => "whois.nic.am", "as" => "whois.nic.as", "at" => "whois.nic.at", "ac.at" => "whois.nic.at", "co.at" => "whois.nic.at", "gv.at" => "whois.nic.at", "or.at" => "whois.nic.at", "asn.au" => "whois.aunic.net", "com.au" => "whois.aunic.net", "edu.au" => "whois.aunic.net", "org.au" => "whois.aunic.net", "net.au" => "whois.aunic.net", "be" => "whois.ripe.net", "ac.be" => "whois.ripe.net", "br" => "whois.nic.br", "adm.br" => "whois.nic.br", "adv.br" => "whois.nic.br", "am.br" => "whois.nic.br", "arq.br" => "whois.nic.br", "art.br" => "whois.nic.br", "bio.br" => "whois.nic.br", "cng.br" => "whois.nic.br", "cnt.br" => "whois.nic.br", "com.br" => "whois.nic.br", "ecn.br" => "whois.nic.br", "eng.br" => "whois.nic.br", "esp.br" => "whois.nic.br", "etc.br" => "whois.nic.br", "eti.br" => "whois.nic.br", "fm.br" => "whois.nic.br", "fot.br" => "whois.nic.br", "fst.br" => "whois.nic.br", "g12.br" => "whois.nic.br", "gov.br" => "whois.nic.br", "ind.br" => "whois.nic.br", "inf.br" => "whois.nic.br", "jor.br" => "whois.nic.br", "lel.br" => "whois.nic.br", "med.br" => "whois.nic.br", "mil.br" => "whois.nic.br", "net.br" => "whois.nic.br", "nom.br" => "whois.nic.br", "ntr.br" => "whois.nic.br", "odo.br" => "whois.nic.br", "org.br" => "whois.nic.br", "ppg.br" => "whois.nic.br", "pro.br" => "whois.nic.br", "psc.br" => "whois.nic.br", "psi.br" => "whois.nic.br", "rec.br" => "whois.nic.br", "slg.br" => "whois.nic.br", "tmp.br" => "whois.nic.br", "tur.br" => "whois.nic.br", "tv.br" => "whois.nic.br", "vet.br" => "whois.nic.br", "zlg.br" => "whois.nic.br", "ca" => "whois.cdnnet.ca", "ab.ca" => "whois.cdnnet.ca", "bc.ca" => "whois.cdnnet.ca", "mb.ca" => "whois.cdnnet.ca", "nb.ca" => "whois.cdnnet.ca", "nf.ca" => "whois.cdnnet.ca", "ns.ca" => "whois.cdnnet.ca", "nt.ca" => "whois.cdnnet.ca", "on.ca" => "whois.cdnnet.ca", "pe.ca" => "whois.cdnnet.ca", "qc.ca" => "whois.cdnnet.ca", "sk.ca" => "whois.cdnnet.ca", "yk.ca" => "whois.cdnnet.ca", "cc" => "whois.nic.cc", "ac.cn" => "whois.cnnic.cn", "com.cn" => "whois.cnnic.cn", "edu.cn" => "whois.cnnic.cn", "gov.cn" => "whois.cnnic.cn", "net.cn" => "whois.cnnic.cn", "org.cn" => "whois.cnnic.cn", "bj.cn" => "whois.cnnic.cn", "sh.cn" => "whois.cnnic.cn", "tj.cn" => "whois.cnnic.cn", "cq.cn" => "whois.cnnic.cn", "he.cn" => "whois.cnnic.cn", "nm.cn" => "whois.cnnic.cn", "ln.cn" => "whois.cnnic.cn", "jl.cn" => "whois.cnnic.cn", "hl.cn" => "whois.cnnic.cn", "js.cn" => "whois.cnnic.cn", "zj.cn" => "whois.cnnic.cn", "ah.cn" => "whois.cnnic.cn", "hb.cn" => "whois.cnnic.cn", "hn.cn" => "whois.cnnic.cn", "gd.cn" => "whois.cnnic.cn", "gx.cn" => "whois.cnnic.cn", "hi.cn" => "whois.cnnic.cn", "sc.cn" => "whois.cnnic.cn", "gz.cn" => "whois.cnnic.cn", "yn.cn" => "whois.cnnic.cn", "xz.cn" => "whois.cnnic.cn", "sn.cn" => "whois.cnnic.cn", "gs.cn" => "whois.cnnic.cn", "qh.cn" => "whois.cnnic.cn", "nx.cn" => "whois.cnnic.cn", "xj.cn" => "whois.cnnic.cn", "tw.cn" => "whois.cnnic.cn", "hk.cn" => "whois.cnnic.cn", "mo.cn" => "whois.cnnic.cn", "cx" => "whois.cx.net", "cz" => "whois.ripe.net", "de" => "whois.nic.de", "dk" => "whois.ripe.net", "fo" => "whois.ripe.net", "com.ec" => "whois.lac.net", "org.ec" => "whois.lac.net", "net.ec" => "whois.lac.net", "mil.ec" => "whois.lac.net", "fin.ec" => "whois.lac.net", "med.ec" => "whois.lac.net", "gov.ec" => "whois.lac.net", "fr" => "whois.nic.fr", "tm.fr" => "whois.nic.fr", "com.fr" => "whois.nic.fr", "asso.fr" => "whois.nic.fr", "presse.fr" => "whois.nic.fr", "gf" => "whois.nplus.gf", "gs" => "whois.adamsnames.tc", "co.il" => "whois.ripe.net", "org.il" => "whois.ripe.net", "net.il" => "whois.ripe.net", "ac.il" => "whois.ripe.net", "k12.il" => "whois.ripe.net", "gov.il" => "whois.ripe.net", "muni.il" => "whois.ripe.net", "ac.in" => "whois.iisc.ernet.in", "co.in" => "whois.iisc.ernet.in", "ernet.in" => "whois.iisc.ernet.in", "gov.in" => "whois.iisc.ernet.in", "net.in" => "whois.iisc.ernet.in", "res.in" => "whois.iisc.ernet.in", "is" => "whois.ripe.net", "it" => "whois.ripe.net", "ac.jp" => "whois.nic.ad.jp", "co.jp" => "whois.nic.ad.jp", "go.jp" => "whois.nic.ad.jp", "or.jp" => "whois.nic.ad.jp", "ne.jp" => "whois.nic.ad.jp", "ac.kr" => "whois.nic.or.kr", "co.kr" => "whois.nic.or.kr", "go.kr" => "whois.nic.or.kr", "ne.kr" => "whois.nic.or.kr", "nm.kr" => "whois.nic.or.kr", "or.kr" => "whois.nic.or.kr", "re.kr" => "whois.nic.or.kr", "li" => "whois.nic.li", "lt" => "whois.ripe.net", "lu" => "whois.ripe.net", "asso.mc" => "whois.ripe.net", "tm.mc" => "whois.ripe.net", "com.mm" => "whois.nic.mm", "org.mm" => "whois.nic.mm", "net.mm" => "whois.nic.mm", "edu.mm" => "whois.nic.mm", "gov.mm" => "whois.nic.mm", "ms" => "whois.adamsnames.tc", "mx" => "whois.nic.mx", "com.mx" => "whois.nic.mx", "org.mx" => "whois.nic.mx", "net.mx" => "whois.nic.mx", "edu.mx" => "whois.nic.mx", "gov.mx" => "whois.nic.mx", "nl" => "whois.domain-registry.nl", "no" => "whois.norid.no", "nu" => "whois.nic.nu", "pl" => "whois.ripe.net", "com.pl" => "whois.ripe.net", "net.pl" => "whois.ripe.net", "org.pl" => "whois.ripe.net", "pt" => "whois.ripe.net", "com.ro" => "whois.ripe.net", "org.ro" => "whois.ripe.net", "store.ro" => "whois.ripe.net", "tm.ro" => "whois.ripe.net", "firm.ro" => "whois.ripe.net", "www.ro" => "whois.ripe.net", "arts.ro" => "whois.ripe.net", "rec.ro" => "whois.ripe.net", "info.ro" => "whois.ripe.net", "nom.ro" => "whois.ripe.net", "nt.ro" => "whois.ripe.net", "ru" => "whois.ripn.net", "com.ru" => "whois.ripn.net", "net.ru" => "whois.ripn.net", "org.ru" => "whois.ripn.net", "se" => "whois.nic-se.se", "si" => "whois.arnes.si", "com.sg" => "whois.nic.net.sg", "org.sg" => "whois.nic.net.sg", "net.sg" => "whois.nic.net.sg", "gov.sg" => "whois.nic.net.sg", "sk" => "whois.ripe.net", "st" => "whois.nic.st", "tc" => "whois.adamsnames.tc", "tf" => "whois.adamsnames.tc", "ac.th" => "whois.thnic.net", "co.th" => "whois.thnic.net", "go.th" => "whois.thnic.net", "mi.th" => "whois.thnic.net", "net.th" => "whois.thnic.net", "or.th" => "whois.thnic.net", "tj" => "whois.nic.tj", "tm" => "whois.nic.tm", "to" => "monarch.tonic.to", "bbs.tr" => "whois.metu.edu.tr", "com.tr" => "whois.metu.edu.tr", "edu.tr" => "whois.metu.edu.tr", "gov.tr" => "whois.metu.edu.tr", "k12.tr" => "whois.metu.edu.tr", "mil.tr" => "whois.metu.edu.tr", "net.tr" => "whois.metu.edu.tr", "org.tr" => "whois.metu.edu.tr", "com.tw" => "whois.twnic.net", "org.tw" => "whois.twnic.net", "net.tw" => "whois.twnic.net", "ac.uk" => "whois.ja.net", "uk.co" => "whois.uk.co", "uk.com" => "whois.nomination.net", "uk.net" => "whois.nomination.net", "gb.com" => "whois.nomination.net", "gb.net" => "whois.nomination.net", "vg" => "whois.adamsnames.tc", "ac.za" => "whois.co.za", "alt.za" => "whois.co.za", "co.za" => "whois.co.za", "edu.za" => "whois.co.za", "gov.za" => "whois.co.za", "mil.za" => "whois.co.za", "net.za" => "whois.co.za", "ngo.za" => "whois.co.za", "nom.za" => "whois.co.za", "org.za" => "whois.co.za", "school.za" => "whois.co.za", "tm.za" => "whois.co.za", "web.za" => "whois.co.za", "sh" => "whois.nic.sh", "kz" => "whois.domain.kz" ); // default whois servers for info $whois_info_servers = array( "com" => "whois.networksolutions.com", "net" => "whois.networksolutions.com", "org" => "whois.networksolutions.com", "edu" => "whois.networksolutions.com", "mil" => "whois.networksolutions.com", "co.uk" => "whois.nic.uk", "org.uk" => "whois.nic.uk", "ltd.uk" => "whois.nic.uk", "plc.uk" => "whois.nic.uk", "br.com" => "whois.centralnic.com", "cn.com" => "whois.centralnic.com", "eu.com" => "whois.centralnic.com", "hu.com" => "whois.centralnic.com", "no.com" => "whois.centralnic.com", "qc.com" => "whois.centralnic.com", "sa.com" => "whois.centralnic.com", "se.com" => "whois.centralnic.com", "se.net" => "whois.centralnic.com", "us.com" => "whois.centralnic.com", "uy.com" => "whois.centralnic.com", "za.com" => "whois.centralnic.com", "ac" => "whois.ripe.net", "ac.ac" => "whois.ripe.net", "co.ac" => "whois.ripe.net", "gv.ac" => "whois.ripe.net", "or.ac" => "whois.ripe.net", "af" => "whois.netnames.net", "am" => "whois.nic.am", "as" => "whois.nic.as", "at" => "whois.nic.at", "ac.at" => "whois.nic.at", "co.at" => "whois.nic.at", "gv.at" => "whois.nic.at", "or.at" => "whois.nic.at", "asn.au" => "whois.aunic.net", "com.au" => "whois.aunic.net", "edu.au" => "whois.aunic.net", "org.au" => "whois.aunic.net", "net.au" => "whois.aunic.net", "be" => "whois.ripe.net", "ac.be" => "whois.ripe.net", "br" => "whois.nic.br", "adm.br" => "whois.nic.br", "adv.br" => "whois.nic.br", "am.br" => "whois.nic.br", "arq.br" => "whois.nic.br", "art.br" => "whois.nic.br", "bio.br" => "whois.nic.br", "cng.br" => "whois.nic.br", "cnt.br" => "whois.nic.br", "com.br" => "whois.nic.br", "ecn.br" => "whois.nic.br", "eng.br" => "whois.nic.br", "esp.br" => "whois.nic.br", "etc.br" => "whois.nic.br", "eti.br" => "whois.nic.br", "fm.br" => "whois.nic.br", "fot.br" => "whois.nic.br", "fst.br" => "whois.nic.br", "g12.br" => "whois.nic.br", "gov.br" => "whois.nic.br", "ind.br" => "whois.nic.br", "inf.br" => "whois.nic.br", "jor.br" => "whois.nic.br", "lel.br" => "whois.nic.br", "med.br" => "whois.nic.br", "mil.br" => "whois.nic.br", "net.br" => "whois.nic.br", "nom.br" => "whois.nic.br", "ntr.br" => "whois.nic.br", "odo.br" => "whois.nic.br", "org.br" => "whois.nic.br", "ppg.br" => "whois.nic.br", "pro.br" => "whois.nic.br", "psc.br" => "whois.nic.br", "psi.br" => "whois.nic.br", "rec.br" => "whois.nic.br", "slg.br" => "whois.nic.br", "tmp.br" => "whois.nic.br", "tur.br" => "whois.nic.br", "tv.br" => "whois.nic.br", "vet.br" => "whois.nic.br", "zlg.br" => "whois.nic.br", "ca" => "whois.cdnnet.ca", "ab.ca" => "whois.cdnnet.ca", "bc.ca" => "whois.cdnnet.ca", "mb.ca" => "whois.cdnnet.ca", "nb.ca" => "whois.cdnnet.ca", "nf.ca" => "whois.cdnnet.ca", "ns.ca" => "whois.cdnnet.ca", "nt.ca" => "whois.cdnnet.ca", "on.ca" => "whois.cdnnet.ca", "pe.ca" => "whois.cdnnet.ca", "qc.ca" => "whois.cdnnet.ca", "sk.ca" => "whois.cdnnet.ca", "yk.ca" => "whois.cdnnet.ca", "cc" => "whois.nic.cc", "ac.cn" => "whois.cnnic.cn", "com.cn" => "whois.cnnic.cn", "edu.cn" => "whois.cnnic.cn", "gov.cn" => "whois.cnnic.cn", "net.cn" => "whois.cnnic.cn", "org.cn" => "whois.cnnic.cn", "bj.cn" => "whois.cnnic.cn", "sh.cn" => "whois.cnnic.cn", "tj.cn" => "whois.cnnic.cn", "cq.cn" => "whois.cnnic.cn", "he.cn" => "whois.cnnic.cn", "nm.cn" => "whois.cnnic.cn", "ln.cn" => "whois.cnnic.cn", "jl.cn" => "whois.cnnic.cn", "hl.cn" => "whois.cnnic.cn", "js.cn" => "whois.cnnic.cn", "zj.cn" => "whois.cnnic.cn", "ah.cn" => "whois.cnnic.cn", "hb.cn" => "whois.cnnic.cn", "hn.cn" => "whois.cnnic.cn", "gd.cn" => "whois.cnnic.cn", "gx.cn" => "whois.cnnic.cn", "hi.cn" => "whois.cnnic.cn", "sc.cn" => "whois.cnnic.cn", "gz.cn" => "whois.cnnic.cn", "yn.cn" => "whois.cnnic.cn", "xz.cn" => "whois.cnnic.cn", "sn.cn" => "whois.cnnic.cn", "gs.cn" => "whois.cnnic.cn", "qh.cn" => "whois.cnnic.cn", "nx.cn" => "whois.cnnic.cn", "xj.cn" => "whois.cnnic.cn", "tw.cn" => "whois.cnnic.cn", "hk.cn" => "whois.cnnic.cn", "mo.cn" => "whois.cnnic.cn", "cx" => "whois.cx.net", "cz" => "whois.ripe.net", "de" => "whois.nic.de", "dk" => "whois.ripe.net", "fo" => "whois.ripe.net", "com.ec" => "whois.lac.net", "org.ec" => "whois.lac.net", "net.ec" => "whois.lac.net", "mil.ec" => "whois.lac.net", "fin.ec" => "whois.lac.net", "med.ec" => "whois.lac.net", "gov.ec" => "whois.lac.net", "fr" => "whois.nic.fr", "tm.fr" => "whois.nic.fr", "com.fr" => "whois.nic.fr", "asso.fr" => "whois.nic.fr", "presse.fr" => "whois.nic.fr", "gf" => "whois.nplus.gf", "gs" => "whois.adamsnames.tc", "co.il" => "whois.ripe.net", "org.il" => "whois.ripe.net", "net.il" => "whois.ripe.net", "ac.il" => "whois.ripe.net", "k12.il" => "whois.ripe.net", "gov.il" => "whois.ripe.net", "muni.il" => "whois.ripe.net", "ac.in" => "whois.iisc.ernet.in", "co.in" => "whois.iisc.ernet.in", "ernet.in" => "whois.iisc.ernet.in", "gov.in" => "whois.iisc.ernet.in", "net.in" => "whois.iisc.ernet.in", "res.in" => "whois.iisc.ernet.in", "is" => "whois.ripe.net", "it" => "whois.ripe.net", "ac.jp" => "whois.nic.ad.jp", "co.jp" => "whois.nic.ad.jp", "go.jp" => "whois.nic.ad.jp", "or.jp" => "whois.nic.ad.jp", "ne.jp" => "whois.nic.ad.jp", "ac.kr" => "whois.nic.or.kr", "co.kr" => "whois.nic.or.kr", "go.kr" => "whois.nic.or.kr", "ne.kr" => "whois.nic.or.kr", "nm.kr" => "whois.nic.or.kr", "or.kr" => "whois.nic.or.kr", "re.kr" => "whois.nic.or.kr", "li" => "whois.nic.li", "lt" => "whois.ripe.net", "lu" => "whois.ripe.net", "asso.mc" => "whois.ripe.net", "tm.mc" => "whois.ripe.net", "com.mm" => "whois.nic.mm", "org.mm" => "whois.nic.mm", "net.mm" => "whois.nic.mm", "edu.mm" => "whois.nic.mm", "gov.mm" => "whois.nic.mm", "ms" => "whois.adamsnames.tc", "mx" => "whois.nic.mx", "com.mx" => "whois.nic.mx", "org.mx" => "whois.nic.mx", "net.mx" => "whois.nic.mx", "edu.mx" => "whois.nic.mx", "gov.mx" => "whois.nic.mx", "nl" => "whois.domain-registry.nl", "no" => "whois.norid.no", "nu" => "whois.nic.nu", "pl" => "whois.ripe.net", "com.pl" => "whois.ripe.net", "net.pl" => "whois.ripe.net", "org.pl" => "whois.ripe.net", "pt" => "whois.ripe.net", "com.ro" => "whois.ripe.net", "org.ro" => "whois.ripe.net", "store.ro" => "whois.ripe.net", "tm.ro" => "whois.ripe.net", "firm.ro" => "whois.ripe.net", "www.ro" => "whois.ripe.net", "arts.ro" => "whois.ripe.net", "rec.ro" => "whois.ripe.net", "info.ro" => "whois.ripe.net", "nom.ro" => "whois.ripe.net", "nt.ro" => "whois.ripe.net", "ru" => "whois.ripn.net", "com.ru" => "whois.ripn.net", "net.ru" => "whois.ripn.net", "org.ru" => "whois.ripn.net", "se" => "whois.nic-se.se", "si" => "whois.arnes.si", "com.sg" => "whois.nic.net.sg", "org.sg" => "whois.nic.net.sg", "net.sg" => "whois.nic.net.sg", "gov.sg" => "whois.nic.net.sg", "sk" => "whois.ripe.net", "st" => "whois.nic.st", "tc" => "whois.adamsnames.tc", "tf" => "whois.adamsnames.tc", "ac.th" => "whois.thnic.net", "co.th" => "whois.thnic.net", "go.th" => "whois.thnic.net", "mi.th" => "whois.thnic.net", "net.th" => "whois.thnic.net", "or.th" => "whois.thnic.net", "tj" => "whois.nic.tj", "tm" => "whois.nic.tm", "to" => "monarch.tonic.to", "bbs.tr" => "whois.metu.edu.tr", "com.tr" => "whois.metu.edu.tr", "edu.tr" => "whois.metu.edu.tr", "gov.tr" => "whois.metu.edu.tr", "k12.tr" => "whois.metu.edu.tr", "mil.tr" => "whois.metu.edu.tr", "net.tr" => "whois.metu.edu.tr", "org.tr" => "whois.metu.edu.tr", "com.tw" => "whois.twnic.net", "org.tw" => "whois.twnic.net", "net.tw" => "whois.twnic.net", "ac.uk" => "whois.ja.net", "uk.co" => "whois.uk.co", "uk.com" => "whois.nomination.net", "uk.net" => "whois.nomination.net", "gb.com" => "whois.nomination.net", "gb.net" => "whois.nomination.net", "vg" => "whois.adamsnames.tc", "ac.za" => "whois.co.za", "alt.za" => "whois.co.za", "co.za" => "whois.co.za", "edu.za" => "whois.co.za", "gov.za" => "whois.co.za", "mil.za" => "whois.co.za", "net.za" => "whois.co.za", "ngo.za" => "whois.co.za", "nom.za" => "whois.co.za", "org.za" => "whois.co.za", "school.za" => "whois.co.za", "tm.za" => "whois.co.za", "web.za" => "whois.co.za", "sh" => "whois.nic.sh", "kz" => "whois.domain.kz" ); // the backup whois servers to try $whois_info_servers_backup = array( "com" => "whois.internic.net", "net" => "whois.internic.net", "org" => "whois.internic.net", "edu" => "whois.internic.net", "mil" => "whois.internic.net", "co.uk" => "whois.nic.uk", "org.uk" => "whois.nic.uk", "ltd.uk" => "whois.nic.uk", "plc.uk" => "whois.nic.uk", "br.com" => "whois.centralnic.com", "cn.com" => "whois.centralnic.com", "eu.com" => "whois.centralnic.com", "hu.com" => "whois.centralnic.com", "no.com" => "whois.centralnic.com", "qc.com" => "whois.centralnic.com", "sa.com" => "whois.centralnic.com", "se.com" => "whois.centralnic.com", "se.net" => "whois.centralnic.com", "us.com" => "whois.centralnic.com", "uy.com" => "whois.centralnic.com", "za.com" => "whois.centralnic.com", "ac" => "whois.ripe.net", "ac.ac" => "whois.ripe.net", "co.ac" => "whois.ripe.net", "gv.ac" => "whois.ripe.net", "or.ac" => "whois.ripe.net", "af" => "whois.netnames.net", "am" => "whois.nic.am", "as" => "whois.nic.as", "at" => "whois.nic.at", "ac.at" => "whois.nic.at", "co.at" => "whois.nic.at", "gv.at" => "whois.nic.at", "or.at" => "whois.nic.at", "asn.au" => "whois.aunic.net", "com.au" => "whois.aunic.net", "edu.au" => "whois.aunic.net", "org.au" => "whois.aunic.net", "net.au" => "whois.aunic.net", "be" => "whois.ripe.net", "ac.be" => "whois.ripe.net", "br" => "whois.nic.br", "adm.br" => "whois.nic.br", "adv.br" => "whois.nic.br", "am.br" => "whois.nic.br", "arq.br" => "whois.nic.br", "art.br" => "whois.nic.br", "bio.br" => "whois.nic.br", "cng.br" => "whois.nic.br", "cnt.br" => "whois.nic.br", "com.br" => "whois.nic.br", "ecn.br" => "whois.nic.br", "eng.br" => "whois.nic.br", "esp.br" => "whois.nic.br", "etc.br" => "whois.nic.br", "eti.br" => "whois.nic.br", "fm.br" => "whois.nic.br", "fot.br" => "whois.nic.br", "fst.br" => "whois.nic.br", "g12.br" => "whois.nic.br", "gov.br" => "whois.nic.br", "ind.br" => "whois.nic.br", "inf.br" => "whois.nic.br", "jor.br" => "whois.nic.br", "lel.br" => "whois.nic.br", "med.br" => "whois.nic.br", "mil.br" => "whois.nic.br", "net.br" => "whois.nic.br", "nom.br" => "whois.nic.br", "ntr.br" => "whois.nic.br", "odo.br" => "whois.nic.br", "org.br" => "whois.nic.br", "ppg.br" => "whois.nic.br", "pro.br" => "whois.nic.br", "psc.br" => "whois.nic.br", "psi.br" => "whois.nic.br", "rec.br" => "whois.nic.br", "slg.br" => "whois.nic.br", "tmp.br" => "whois.nic.br", "tur.br" => "whois.nic.br", "tv.br" => "whois.nic.br", "vet.br" => "whois.nic.br", "zlg.br" => "whois.nic.br", "ca" => "whois.cdnnet.ca", "ab.ca" => "whois.cdnnet.ca", "bc.ca" => "whois.cdnnet.ca", "mb.ca" => "whois.cdnnet.ca", "nb.ca" => "whois.cdnnet.ca", "nf.ca" => "whois.cdnnet.ca", "ns.ca" => "whois.cdnnet.ca", "nt.ca" => "whois.cdnnet.ca", "on.ca" => "whois.cdnnet.ca", "pe.ca" => "whois.cdnnet.ca", "qc.ca" => "whois.cdnnet.ca", "sk.ca" => "whois.cdnnet.ca", "yk.ca" => "whois.cdnnet.ca", "cc" => "whois.nic.cc", "ac.cn" => "whois.cnnic.cn", "com.cn" => "whois.cnnic.cn", "edu.cn" => "whois.cnnic.cn", "gov.cn" => "whois.cnnic.cn", "net.cn" => "whois.cnnic.cn", "org.cn" => "whois.cnnic.cn", "bj.cn" => "whois.cnnic.cn", "sh.cn" => "whois.cnnic.cn", "tj.cn" => "whois.cnnic.cn", "cq.cn" => "whois.cnnic.cn", "he.cn" => "whois.cnnic.cn", "nm.cn" => "whois.cnnic.cn", "ln.cn" => "whois.cnnic.cn", "jl.cn" => "whois.cnnic.cn", "hl.cn" => "whois.cnnic.cn", "js.cn" => "whois.cnnic.cn", "zj.cn" => "whois.cnnic.cn", "ah.cn" => "whois.cnnic.cn", "hb.cn" => "whois.cnnic.cn", "hn.cn" => "whois.cnnic.cn", "gd.cn" => "whois.cnnic.cn", "gx.cn" => "whois.cnnic.cn", "hi.cn" => "whois.cnnic.cn", "sc.cn" => "whois.cnnic.cn", "gz.cn" => "whois.cnnic.cn", "yn.cn" => "whois.cnnic.cn", "xz.cn" => "whois.cnnic.cn", "sn.cn" => "whois.cnnic.cn", "gs.cn" => "whois.cnnic.cn", "qh.cn" => "whois.cnnic.cn", "nx.cn" => "whois.cnnic.cn", "xj.cn" => "whois.cnnic.cn", "tw.cn" => "whois.cnnic.cn", "hk.cn" => "whois.cnnic.cn", "mo.cn" => "whois.cnnic.cn", "cx" => "whois.cx.net", "cz" => "whois.ripe.net", "de" => "whois.nic.de", "dk" => "whois.ripe.net", "fo" => "whois.ripe.net", "com.ec" => "whois.lac.net", "org.ec" => "whois.lac.net", "net.ec" => "whois.lac.net", "mil.ec" => "whois.lac.net", "fin.ec" => "whois.lac.net", "med.ec" => "whois.lac.net", "gov.ec" => "whois.lac.net", "fr" => "whois.nic.fr", "tm.fr" => "whois.nic.fr", "com.fr" => "whois.nic.fr", "asso.fr" => "whois.nic.fr", "presse.fr" => "whois.nic.fr", "gf" => "whois.nplus.gf", "gs" => "whois.adamsnames.tc", "co.il" => "whois.ripe.net", "org.il" => "whois.ripe.net", "net.il" => "whois.ripe.net", "ac.il" => "whois.ripe.net", "k12.il" => "whois.ripe.net", "gov.il" => "whois.ripe.net", "muni.il" => "whois.ripe.net", "ac.in" => "whois.iisc.ernet.in", "co.in" => "whois.iisc.ernet.in", "ernet.in" => "whois.iisc.ernet.in", "gov.in" => "whois.iisc.ernet.in", "net.in" => "whois.iisc.ernet.in", "res.in" => "whois.iisc.ernet.in", "is" => "whois.ripe.net", "it" => "whois.ripe.net", "ac.jp" => "whois.nic.ad.jp", "co.jp" => "whois.nic.ad.jp", "go.jp" => "whois.nic.ad.jp", "or.jp" => "whois.nic.ad.jp", "ne.jp" => "whois.nic.ad.jp", "ac.kr" => "whois.nic.or.kr", "co.kr" => "whois.nic.or.kr", "go.kr" => "whois.nic.or.kr", "ne.kr" => "whois.nic.or.kr", "nm.kr" => "whois.nic.or.kr", "or.kr" => "whois.nic.or.kr", "re.kr" => "whois.nic.or.kr", "li" => "whois.nic.li", "lt" => "whois.ripe.net", "lu" => "whois.ripe.net", "asso.mc" => "whois.ripe.net", "tm.mc" => "whois.ripe.net", "com.mm" => "whois.nic.mm", "org.mm" => "whois.nic.mm", "net.mm" => "whois.nic.mm", "edu.mm" => "whois.nic.mm", "gov.mm" => "whois.nic.mm", "ms" => "whois.adamsnames.tc", "mx" => "whois.nic.mx", "com.mx" => "whois.nic.mx", "org.mx" => "whois.nic.mx", "net.mx" => "whois.nic.mx", "edu.mx" => "whois.nic.mx", "gov.mx" => "whois.nic.mx", "nl" => "whois.domain-registry.nl", "no" => "whois.norid.no", "nu" => "whois.nic.nu", "pl" => "whois.ripe.net", "com.pl" => "whois.ripe.net", "net.pl" => "whois.ripe.net", "org.pl" => "whois.ripe.net", "pt" => "whois.ripe.net", "com.ro" => "whois.ripe.net", "org.ro" => "whois.ripe.net", "store.ro" => "whois.ripe.net", "tm.ro" => "whois.ripe.net", "firm.ro" => "whois.ripe.net", "www.ro" => "whois.ripe.net", "arts.ro" => "whois.ripe.net", "rec.ro" => "whois.ripe.net", "info.ro" => "whois.ripe.net", "nom.ro" => "whois.ripe.net", "nt.ro" => "whois.ripe.net", "ru" => "whois.ripn.net", "com.ru" => "whois.ripn.net", "net.ru" => "whois.ripn.net", "org.ru" => "whois.ripn.net", "se" => "whois.nic-se.se", "si" => "whois.arnes.si", "com.sg" => "whois.nic.net.sg", "org.sg" => "whois.nic.net.sg", "net.sg" => "whois.nic.net.sg", "gov.sg" => "whois.nic.net.sg", "sk" => "whois.ripe.net", "st" => "whois.nic.st", "tc" => "whois.adamsnames.tc", "tf" => "whois.adamsnames.tc", "ac.th" => "whois.thnic.net", "co.th" => "whois.thnic.net", "go.th" => "whois.thnic.net", "mi.th" => "whois.thnic.net", "net.th" => "whois.thnic.net", "or.th" => "whois.thnic.net", "tj" => "whois.nic.tj", "tm" => "whois.nic.tm", "to" => "monarch.tonic.to", "bbs.tr" => "whois.metu.edu.tr", "com.tr" => "whois.metu.edu.tr", "edu.tr" => "whois.metu.edu.tr", "gov.tr" => "whois.metu.edu.tr", "k12.tr" => "whois.metu.edu.tr", "mil.tr" => "whois.metu.edu.tr", "net.tr" => "whois.metu.edu.tr", "org.tr" => "whois.metu.edu.tr", "com.tw" => "whois.twnic.net", "org.tw" => "whois.twnic.net", "net.tw" => "whois.twnic.net", "ac.uk" => "whois.ja.net", "uk.co" => "whois.uk.co", "uk.com" => "whois.nomination.net", "uk.net" => "whois.nomination.net", "gb.com" => "whois.nomination.net", "gb.net" => "whois.nomination.net", "vg" => "whois.adamsnames.tc", "ac.za" => "whois.co.za", "alt.za" => "whois.co.za", "co.za" => "whois.co.za", "edu.za" => "whois.co.za", "gov.za" => "whois.co.za", "mil.za" => "whois.co.za", "net.za" => "whois.co.za", "ngo.za" => "whois.co.za", "nom.za" => "whois.co.za", "org.za" => "whois.co.za", "school.za" => "whois.co.za", "tm.za" => "whois.co.za", "web.za" => "whois.co.za", "sh" => "whois.nic.sh", "kz" => "whois.domain.kz" ); // the strings that are returned if the domain is available $whois_avail_strings = array( "whois.internic.net" =>"No match", "whois.nic.uk" => "No match", "whois.bulkregister.com" => "Not found", "whois.centralnic.com" => "No match", "whois.ripe.net" => "No entries found", "whois.netnames.net" => "No Match", "whois.nic.am" => "No information available", "whois.nic.as" => "Domain Not Found", "whois.nic.at" => "No entries found", "whois.aunic.net" => "No entries found", "whois.nic.br" => "No match for", "whois.cdnnet.ca" => "Not found", "whois.nic.cc" => "No match", "whois.cnnic.cn" => "No entries", "whois.cx.net" => "No match for", "whois.co.za" => "No information available", "whois.twnic.net" => "No Records Found", "whois.metu.edu.tr" => "Not found in database", "whois.adamsnames.tc" => "is not registered", "whois.ja.net" => "Sorry - no", "whois.nomination.net" => "No match for", "whoic.thnic.net" => "No entries", "monarch.tonic.to" => "Not found", "whois.nic.tm" => "No match", "whois.nic.tj" => "No match", "whois.nic.st" => "No entries found", "whois.nic.net.sg" => "NO entry found", "whois.arnes.si" => "No entries found", "whois.nic-se.se" => "No data found", "whois.ripn.net" => "No entries found", "whois.nic.nu" => "Match for", "whois.norid.no" => "no matches", "whois.domain-registry.nl" => "not a registered domain", "whois.nic.mx" => "Referencias de Organization No Encontradas", "whois.nic.mm" => "No domains matched", "whois.net.au" => "AUNIC -T domain", "whois.nic.bt" => "shrubbery.com", "whois.cdnnet.ca" => "Not found", "whois.nic.ch" => "No entries found", "whois.nic.cx" => "No match for", "whois.nic.de" => "No entries found", "whois.lac.net" => "No match found", "whois.nic.fr" => "No entries found", "whois.nplus.gf" => "not found in our database", "whois.iisc.ernet.in" => "no entries found", "whois.nic.ad.jp" => "No match", "whois.nic.or.kr" => "is not registered", "whois.nic.li" => "No entries found", "whois.nic.mm" => "No domains matched", "whois.norid.no" => "no matches", "whois.nic-se.se" => "No data found", "monarch.tonic.tj" => "Not found", "whois.uk.co" => "NO MATCH", "whois.nic.sh" => "No match", "whois.domain.kz" => "No entries found", "whois.crsnic.net" => "No match for" ); // some substitution strings follow $errormsg = ""; $titlebar = "MWhois written by Matt Wilson"; // the defatul title bar $rawoutput = ""; $avail = array(); $unavail = array(); $whois_server = ""; 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){ $whois_server = $whois_servers[$ext]; } else { fputs($co, $domain.".".$ext."\n"); while(!feof($co)) $output .= fgets($co,128); fclose($co); $he = strpos($output, $whois_si_servers[$ext]) + strlen($whois_si_servers[$ext]); $le = strpos($output, "\n", $he); $whois_server = substr($output, $he, $le-$he); } } 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; $f = implode("",@file($fil)); $f = str_replace("[>WHOIS_SERVER<]",$whois_servers[$ext],$f); $f = str_replace("[>TITLE_BAR<]",$titlebar,$f); $f = str_replace("[>DOMAIN<]",$domain,$f); $f = str_replace("[>ERROR_MSG<]",$errormsg,$f); $f = str_replace("[>RAWOUTPUT<]",$rawoutput,$f); for($l=0; $l".$avail[$l]."
"; } for($l=0; $l".$unavail[$l]."
"; } $f = str_replace("[>AVAIL_LIST<]",$avail_s,$f); $f = str_replace("[>UNAVAIL_LIST<]",$unavail_s,$f); $f = str_replace("[>EXT<]",$ext,$f); $f = str_replace("[>EXT_LIST<]",implode("
",$whois_exts),$f); $f = str_replace("[>EXT_HTML_LIST<]","",$f); return $f; } // 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; $titlebar = $error_title; if($use_global_templates) echo make_changes($template_header); echo make_changes($template_error); if($use_global_templates) echo make_changes($template_footer); exit(); } function my_in_array($val,$array_) { for($l=0; $l 67){ $errormsg = "Nom de domaine trop long, ou trop court"; return 0; } if(ereg("^-|-$",$domain)){ $errormsg = "Attention : Problème avec les tirets"; return 0; } if(!ereg("([a-z]|[A-Z]|[0-9]|-){".strlen($domain)."}",$domain)){ $errormsg = "Attention : Nom de domaine avec des caractères non autorisés."; return 0; } } return 1; } // 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; $rawoutput = ""; if($raw) return do_raw($domainname,$ext); if(($ns = fsockopen($whois_servers[$ext],43)) == false){ $errormsg = "Connection à ".$whois_servers[$ext]." impossible"; return -1; } fputs($ns,"$domainname.$ext\n"); while(!feof($ns)) $rawoutput .= fgets($ns,128); fclose($ns); echo "\n"; if(!ereg($whois_avail_strings[$whois_servers[$ext]], $rawoutput)) return 0; return 1; } // 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; choose_info_server($domainname, $ext); if(($ns = fsockopen($whois_server,43)) == false){ if(($ns = fsockopen($whois_info_servers[$ext],43)) == false){ if(($ns = fsockopen($whois_info_servers_backup[$ext], 43)) == false){ return -1; } else { $whois_server = $whois_info_servers_backup[$ext]; } } else { $whois_server = $whois_info_servers[$ext]; } } print "\n"; fputs($ns,"$domainname.$ext\n"); while(!feof($ns)) $rawoutput = $rawoutput.fgets($ns,128); fclose($ns); // $pos = @strpos($rawoutput,$whois_avail_strings[$server]); // if(is_string($pos) && !$pos){} // else{ if(!is_string($pos) || $pos){ if(($ns = fsockopen($whois_info_servers_backup[$ext],43)) == false) return -1; else{ $rawoutput = ""; fputs($ns,"$domainname.$ext\n"); while(!feof($ns)) $rawoutput = $rawoutput.fgets($ns,128); $pos = @strpos($rawoutput,$whois_avail_strings[$whois_info_servers_backup[$ext]]); if(!is_string($pos) || $pos){} else return -1; } } $titlebar = $raw_output_title; if($use_global_templates) echo make_changes($template_header); echo make_changes($template_raw_output); if($use_global_templates) echo make_changes($template_footer); exit(); } 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; $titlebar = $search_title; if($use_global_templates) echo make_changes($template_header); echo make_changes($template_search); if($use_global_templates) echo make_changes($template_footer); exit(); } function do_avail() { global $template_footer; global $template_header; global $use_global_templates; global $titlebar; global $template_available; global $available_title; $titlebar = $available_title; if($use_global_templates) echo make_changes($template_header); echo make_changes($template_available); if($use_global_templates) echo make_changes($template_footer); exit(); } function do_taken() { global $template_footer; global $template_header; global $use_global_templates; global $template_taken; global $titlebar; global $taken_title; $titlebar = $taken_title; if($use_global_templates) echo make_changes($template_header); echo make_changes($template_taken); if($use_global_templates) echo make_changes($template_footer); exit(); } function do_exts() { global $template_footer; global $template_header; global $use_global_templates; global $template_exts_list; global $titlebar; global $exts_list_title; $titlebar = $exts_list_title; if($use_global_templates) echo make_changes($template_header); echo make_changes($template_exts_list); if($use_global_templates) echo make_changes($template_footer); exit(); } 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; $titlebar = $global_title; if($use_global_templates) echo make_changes($template_header); if(!isset($domain)){ global $template_global; echo make_changes($template_global); } else{ global $template_global_results; for($l=0; $l