DNS Status checker (whois) [V1.1]
Auteur: Wim - 02 december 2005 - 23:44 - Gekeurd door: Ontani - Hits: 10290 - Aantal punten: (0 stemmen)
Uploaden, en that's it!
$status heeft de waarde "free" als het domein vrij ter registratie is, "quarantine" als het domein in quarantine is, en "registered" als het domein een andere status heeft (normaal registered)
Up-2-date source (= source van demo):
http://scripting.mizone.be/Source/dnsstatuschecker
Supported extentions:
be, nl, com, org, net, biz, info, fr, nu, tv, uk, me.uk, co.uk, ltd.uk, net.uk, org.uk, plc.uk, ac.uk, cc, bz, ws, name, us, ac.be
SourceForge (SF.NET) page: http://sourceforge.net/projects/dnsstatuscheck
|
Code: |
checker.php [or whatever]:
<?php
// script door GDX^
// Wim Mariën <gdx@mizone.be>
// http://scripting.mizone.be/
//
// Gratis voor gebruik.
//
// Meerdere extenties op aanvraag per PM op Sitemasters.be
// Writed for http://www.sitemasters.be/
//
// Supported extentions: be, nl, com, org, net, biz, info, fr, nu, tv, uk, me.uk, co.uk, ltd.uk, net.uk, org.uk, plc.uk, ac.uk, cc, bz, ws, name, us, ac.be
//
// V1.1
//
// CHANGELOG:
// # 03/12/2005
// # - Added quarantine-status (currently only for .be)
// # - Addes some extentions: nu, tv, uk, me.uk, co.uk, ltd.uk, net.uk, org.uk, plc.uk, ac.uk
// #04/12/2005
// # - Added some extentions: cc, bz, ws, name, uc, ac.be
include ("dnsservers.php");
if(isset($_REQUEST['lookup'])) {
if(empty($_REQUEST['domain']))
exit ("Please fill in all fields");
$ext = $_REQUEST['ext'];
$sock = fsockopen($servers[$ext], $ports[$ext], $errno, $errstr, 5);
$command = str_replace ("{domain}", $_REQUEST['domain'], $commands[$ext]);
fputs($sock, $command);
while (!feof($sock))
$output .= fgets($sock, 128)."<br />";
if(preg_match("/".$preg[$ext]."/", $output))
$status = "free";
elseif($quarantine[$ext] !== false && preg_match("/".$quarantine[$ext]."/", $output))
$status = "quarantine";
else
$status = "registered";
fclose($sock);
}
else{
echo ("<form method=\"post\">\n");
echo ("DNS status lookup:<br />\n");
echo ("Domain: <input type=\"text\" name=\"domain\" /> (without www. or extention!)<br />\n");
echo ("Extention:\n <select name=\"ext\">\n");
foreach ($supportedext as $ext)
echo ("<option value=\"".$ext."\">".$ext."</option>\n");
echo ("</select><br />\n<br />\n");
echo ("<input type=\"submit\" name=\"lookup\" value=\"Check status!\" />\n");
echo ("</form>\n");
}
?>
<?php // script door GDX^ // Wim Mariën <gdx@mizone.be> // http://scripting.mizone.be/ // // Gratis voor gebruik. // // Meerdere extenties op aanvraag per PM op Sitemasters.be // Writed for http://www.sitemasters.be/ // // Supported extentions: be, nl, com, org, net, biz, info, fr, nu, tv, uk, me.uk, co.uk, ltd.uk, net.uk, org.uk, plc.uk, ac.uk, cc, bz, ws, name, us, ac.be // // V1.1 // // CHANGELOG: // # 03/12/2005 // # - Added quarantine-status (currently only for .be) // # - Addes some extentions: nu, tv, uk, me.uk, co.uk, ltd.uk, net.uk, org.uk, plc.uk, ac.uk // #04/12/2005 // # - Added some extentions: cc, bz, ws, name, uc, ac.be include ("dnsservers.php"); if(isset($_REQUEST['lookup'])) { if(empty($_REQUEST['domain'])) exit ("Please fill in all fields"); $ext = $_REQUEST['ext']; $sock = fsockopen($servers[$ext], $ports[$ext], $errno, $errstr, 5); $command = str_replace ("{domain}", $_REQUEST['domain'], $commands[$ext]); $output .= fgets($sock, 128)."<br />"; $status = "free"; elseif($quarantine[$ext] !== false && preg_match("/".$quarantine[$ext]."/", $output)) $status = "quarantine"; else $status = "registered"; } else{ echo ("<form method=\"post\">\n"); echo ("DNS status lookup:<br />\n"); echo ("Domain: <input type=\"text\" name=\"domain\" /> (without www. or extention!)<br />\n"); echo ("Extention:\n <select name=\"ext\">\n"); foreach ($supportedext as $ext) echo ("<option value=\"".$ext."\">".$ext."</option>\n"); echo ("</select><br />\n<br />\n"); echo ("<input type=\"submit\" name=\"lookup\" value=\"Check status!\" />\n"); } ?>
dnsservers.php:
<?php
$supportedext = array("be", "nl", "com", "org", "net", "biz", "info", "fr", "nu", "tv", "uk", "me.uk", "co.uk", "ltd.uk", "net.uk", "org.uk", "plc.uk", "ac.uk", "cc", "bz", "ws", "name", "us", "ac.be");
$servers = array(
"be" => "whois.dns.be",
"nl" => "whois.domain-registry.nl",
"com" => "whois.nsiregistry.net",
"org" => "whois.publicinterestregistry.net",
"net" => "whois.nsiregistry.net",
"biz" => "whois.biz",
"info" => "whois.afilias.info",
"fr" => "whois.nic.fr",
"nu" => "whois.nic.nu",
"tv" => "whois.internic.net",
"uk" => "whois.nic.uk",
"co.uk" => "whois.nic.uk",
"me.uk" => "whois.nic.uk",
"ltd.uk" => "whois.nic.uk",
"net.uk" => "whois.nic.uk",
"org.uk" => "whois.nic.uk",
"plc.uk" => "whois.nic.uk",
"ac.uk" => "whois.nic.uk",
"cc" => "whois.nic.cc",
"bz" => "whois.nic.cc",
"ws" => "whois.nic.ws",
"name" => "whois.nic.name",
"us" => "whois.nic.us",
"ac.be" => "whois.dns.be"
);
$ports = array(
"be" => 4343,
"nl" => 43,
"com" => 43,
"org" => 43,
"net" => 43,
"biz" => 43,
"info" => 43,
"fr" => 43,
"nu" => 43,
"tv" => 43,
"uk" => 43,
"co.uk" => 43,
"me.uk" => 43,
"ltd.uk" => 43,
"net.uk" => 43,
"org.uk" => 43,
"plc.uk" => 43,
"ac.uk" => 43,
"cc" => 43,
"bz" => 43,
"ws" => 43,
"name" => 43,
"us" => 43,
"ac.be" => 4343
);
$commands = array (
"be" => "GET 1.0 {domain}\r\n",
"nl" => "is {domain}.nl\r\n",
"com" => "{domain}.com\r\n",
"org" => "{domain}.org\r\n",
"net" => "{domain}.net\r\n",
"biz" => "{domain}.biz\r\n",
"info" => "{domain}.info\r\n",
"fr" => "{domain}.fr\r\n",
"nu" => "{domain}.nu\r\n",
"tv" => "{domain}.tv\r\n",
"uk" => "{domain}.uk\r\n",
"co.uk" => "{domain}.co.uk\r\n",
"me.uk" => "{domain}.me.uk\r\n",
"ltd.uk" => "{domain}.ltd.uk\r\n",
"net.uk" => "{domain}.net.uk\r\n",
"org.uk" => "{domain}.org.uk\r\n",
"plc.uk" => "{domain}.plc.uk\r\n",
"ac.uk" => "{domain}.ac.uk\r\n",
"cc" => "{domain}.cc\r\n",
"bz" => "{domain}.bz\r\n",
"ws" => "{domain}.ws\r\n",
"name" => "{domain}.name\r\n",
"us" => "{domain}.us\r\n",
"ac.be" => "GET 1.0 {domain}\r\n"
);
$preg = array(
"be" => "FREE",
"nl" => "is free",
"com" => "No match for",
"org" => "NOT FOUND",
"net" => "No match for",
"biz" => "Not found:",
"info" => "NOT FOUND",
"fr" => "No entries found in the AFNIC Database.",
"nu" => "NO MATCH for domain",
"tv" => "No match for",
"uk" => "{domain}.uk\r\n",
"co.uk" => "No match for",
"me.uk" => "No match for",
"ltd.uk" => "No match for",
"net.uk" => "No match for",
"org.uk" => "No match for",
"plc.uk" => "No match for",
"ac.uk" => "No match for",
"cc" => "No match for",
"bz" => "No match for",
"ws" => "No match for",
"name" => "No match.",
"us" => "Not found:",
"ac.be" => "FREE"
);
$quarantine = array(
"be" => "QUARANTINE",
"nl" => false,
"com" => false,
"org" => false,
"net" => false,
"biz" => false,
"info" => false,
"fr" => false,
"nu" => false,
"tv" => false,
"uk" => false,
"co.uk" => false,
"me.uk" => false,
"ltd.uk" => false,
"net.uk" => false,
"org.uk" => false,
"plc.uk" => false,
"ac.uk" => false,
"cc" => false,
"bz" => false,
"ws" =>false,
"name" => false,
"us" => false,
"ac.be" => false
);
?>
<?php $supportedext = array("be", "nl", "com", "org", "net", "biz", "info", "fr", "nu", "tv", "uk", "me.uk", "co.uk", "ltd.uk", "net.uk", "org.uk", "plc.uk", "ac.uk", "cc", "bz", "ws", "name", "us", "ac.be"); "be" => "whois.dns.be", "nl" => "whois.domain-registry.nl", "com" => "whois.nsiregistry.net", "org" => "whois.publicinterestregistry.net", "net" => "whois.nsiregistry.net", "biz" => "whois.biz", "info" => "whois.afilias.info", "fr" => "whois.nic.fr", "nu" => "whois.nic.nu", "tv" => "whois.internic.net", "uk" => "whois.nic.uk", "co.uk" => "whois.nic.uk", "me.uk" => "whois.nic.uk", "ltd.uk" => "whois.nic.uk", "net.uk" => "whois.nic.uk", "org.uk" => "whois.nic.uk", "plc.uk" => "whois.nic.uk", "ac.uk" => "whois.nic.uk", "cc" => "whois.nic.cc", "bz" => "whois.nic.cc", "ws" => "whois.nic.ws", "name" => "whois.nic.name", "us" => "whois.nic.us", "ac.be" => "whois.dns.be" ); "be" => 4343, "nl" => 43, "com" => 43, "org" => 43, "net" => 43, "biz" => 43, "info" => 43, "fr" => 43, "nu" => 43, "tv" => 43, "uk" => 43, "co.uk" => 43, "me.uk" => 43, "ltd.uk" => 43, "net.uk" => 43, "org.uk" => 43, "plc.uk" => 43, "ac.uk" => 43, "cc" => 43, "bz" => 43, "ws" => 43, "name" => 43, "us" => 43, "ac.be" => 4343 ); "be" => "GET 1.0 {domain}\r\n", "nl" => "is {domain}.nl\r\n", "com" => "{domain}.com\r\n", "org" => "{domain}.org\r\n", "net" => "{domain}.net\r\n", "biz" => "{domain}.biz\r\n", "info" => "{domain}.info\r\n", "fr" => "{domain}.fr\r\n", "nu" => "{domain}.nu\r\n", "tv" => "{domain}.tv\r\n", "uk" => "{domain}.uk\r\n", "co.uk" => "{domain}.co.uk\r\n", "me.uk" => "{domain}.me.uk\r\n", "ltd.uk" => "{domain}.ltd.uk\r\n", "net.uk" => "{domain}.net.uk\r\n", "org.uk" => "{domain}.org.uk\r\n", "plc.uk" => "{domain}.plc.uk\r\n", "ac.uk" => "{domain}.ac.uk\r\n", "cc" => "{domain}.cc\r\n", "bz" => "{domain}.bz\r\n", "ws" => "{domain}.ws\r\n", "name" => "{domain}.name\r\n", "us" => "{domain}.us\r\n", "ac.be" => "GET 1.0 {domain}\r\n" ); "be" => "FREE", "nl" => "is free", "com" => "No match for", "org" => "NOT FOUND", "net" => "No match for", "biz" => "Not found:", "info" => "NOT FOUND", "fr" => "No entries found in the AFNIC Database.", "nu" => "NO MATCH for domain", "tv" => "No match for", "uk" => "{domain}.uk\r\n", "co.uk" => "No match for", "me.uk" => "No match for", "ltd.uk" => "No match for", "net.uk" => "No match for", "org.uk" => "No match for", "plc.uk" => "No match for", "ac.uk" => "No match for", "cc" => "No match for", "bz" => "No match for", "ws" => "No match for", "name" => "No match.", "us" => "Not found:", "ac.be" => "FREE" ); "be" => "QUARANTINE", "nl" => false, "com" => false, "org" => false, "net" => false, "biz" => false, "info" => false, "fr" => false, "nu" => false, "tv" => false, "uk" => false, "co.uk" => false, "me.uk" => false, "ltd.uk" => false, "net.uk" => false, "org.uk" => false, "plc.uk" => false, "ac.uk" => false, "cc" => false, "bz" => false, "ws" =>false, "name" => false, "us" => false, "ac.be" => false ); ?>
Download code (.txt)
|
|
|
Stemmen |
Niet ingelogd. |
|