#!/usr/bin/perl ######################################################### # WhoDomLite V1.1.3 # Written by Mark Lovick February 2001 # Copyright WJC Internet 2001 # Unauthorised use of this script is strictly prohibited # ======================================================= # Changes: # # + July 2001 ~ v1.1 # - Added javascript to check the syntax of the domain # - Added the capability to change the default colors # - Changed the linkback to open in a new window # + July 2001 ~ v1.1.1 # - Corrected a fault with the syntax checking # + October 2001 ~ v1.1.2 # - Added support for .info domains # - It is now possible to change the script file name # # ======================================================= # INSTALLATION # # + This version of WhoDomLite must be uploaded to your # UNIX/LINUX or NT/WIN2000 server in ASCII format. # + Make sure you are running Perl5 or greater # + Make sure the first line in this script points to your # Perl interpreter e.g. #!/usr/local/bin/perl or # #!/usr/bin/perl or #!/usr/sbin/perl (ask your ISP) # + You can place your HTML header and footer in the # sections below. REMEMBER to comment the @ out of any # email addresses in your HTML by placing a backslash # before it: e.g. joe\@bloggs.com # + If you wish to change the default color of the display # then adjust the settings in the global configuration # section. # + If you are running this script on a unix server then # you must change the permissions of the script to 755. # # ======================================================= # CUSTOMISE THE LOOK # # The aim was to have this script to be completely self # contained. Therefore I decided that it should be # possible to enter a header and footer directly in the # script itself. The alternative would be to have seperate # header and footer files but then this script would not # be self contained any more. # # PLACE THE TOP OF YOUR HTML PAGE HERE: # REMEMBER to comment the @ out of any # email addresses in your HTML by placing a backslash # before it: e.g. joe\@bloggs.com # ########################################################## sub head { # <- Do not touch this or the next line! print qq~ CompuWeb Communications Services - Fast and Reliable Internet Services
logoHeader Image
0870 703 1000 
 

Data Centre Tour
Take a tour of our state of the art Data Centre.

more information


need help?

Reseller Package
Reseller PackageWe have some great deals on Reseller Package. So why not signup today for as little as £29.99 per month

more information


 
home | clients
clients
~; # <- Do not touch this! ######################################################### # END OF HEADER # PLACE THE BOTTOM OF YOUR HTML PAGE HERE: ######################################################### } sub foot { # <- Do not touch this or the next line! print qq~

Order Now
All prices exclude VAT - CWCS is a trading style for CompuWeb Communications Services Limited© 1997-2002;
~; } # <- Do not touch this! ######################################################### # # Global Configuration: # # This is the colour of the head and foot tables $tableColour = '#FFFFFF'; # # This is the colour of the text in the table head and foot $tableTextColour = '#000000'; # # This is the colour of the table head and foot border # Must be in RGB format. $tableBorder = '0,0,0'; # # This is the domain search box colour. Must be in RGB format $searchColour = '61,117,144'; # # This is the background colour of the search button $buttonBgrnd = '#3D7590'; # # This is the search button text colour $buttonText = '#FFFFFF'; # # This should be self explanitory! $show_COM = 'y'; $show_NET = 'y'; $show_ORG = 'y'; $show_INFO = 'y'; $show_BIZ = 'y'; $show_COUK = 'y'; $show_ORGUK = 'y'; # # ======================================================= # This script is provided without warranty. By using this # script you agree to indemnify M.Lovick of any damages # or losses of any kind that may arise from the use of this # script. # # YOU MUST NOT CHANGE ANY OF THE CODE BELOW. # We only allow you to use this script FREE OF CHARGE if # you provide a link back to our home page. Many hours # of development has gone into this release so it is the # least you can do. # # THANKYOU FOR USING WhoDomLite # # WhoDomLite must only be downloaded/ditributed through # http://www.noc2.com/ if you were able to download this # script elsewhere then please inform mlovick@noc2.com # ########################################################################################################################### # DO NOT ALTER THE CODE BELOW. ############################################################################################ ########################################################################################################################### if ($show_COM eq "y") { $com = " .com "; } if ($show_NET eq "y") { $net = " .net "; } if ($show_ORG eq "y") { $org = " .org "; } if ($show_INFO eq "y") { $info = " .info "; } if ($show_BIZ eq "y") { $biz = " .biz "; } if ($show_COUK eq "y") { $couk = " .co.uk "; } if ($show_ORGUK eq "y") { $orguk = " .org.uk"; } use IO::Socket; &parse; my $action = $form{'action'}; my $dom = "\L$form{'dom'}"; my $whois_server = $form{'dispWhois'}; print "Content-type: text/html\n\n"; &head; print qq~
WHOIS DOMAIN SEARCH
~; if (!$action) { print qq~

To research any name it in the text field below, do not include www - for example type microsoft and then select ".com". You can search any or all of the extensions by selecting/deselecting the checkboxes.

WWW.


Choose your extension
$com $net $org $info $biz $couk $orguk

~; } if ($action eq 'search') { print "
Query Results

Thankyou for using our domain search. We have pleasure in presenting you with the results below. Search Again.

\n"; foreach $tld (@tlds) { if ($tld =~ /.uk/) { $whois_server = "whois.nic.uk"; } elsif ($tld =~ /uk./) { $whois_server = "whois.nomination.net"; } elsif ($tld =~ /info/) { $whois_server = "whois.afilias.net"; } elsif ($tld =~ /biz/) { $whois_server = "whois.nic.biz"; } else { $whois_server = "whois.crsnic.net"; } $flag = ''; &whois; foreach $line (@out) { if ($line =~ /No match for/ || $line =~ /NOT FOUND/ || $line =~ /Not found/) { $flag++ } if ($line =~ /Whois Server/) { chomp $line; ($junk,$USwhois) = split(/\: /,$line); } } if ($USwhois) { $dispWhois = "\L$USwhois"; $USwhois = ''; } else { $dispWhois = $whois_server; } if ($flag) { print "$dom.$tld may be AVAILABLE

\n"; } else { print qq~ $dom.$tld is not available View Whois

\n~; } } print "

\n"; } if ($action eq 'display') { $tld = $form{'ext'}; if (&whois) { print qq~ This is the raw whois output provided by $whois_server for the domain: $dom.$tld Search Again

@out
~; } else { print "ERROR - Whois server $whois_server not working!\n"; } } # End action display. sub whois { $socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$whois_server",PeerPort=>'43',); if ($socket) { print $socket "$dom" . ".$tld" . "\015\012"; @out = <$socket>; close $socket; } } sub parse { my($in, @in, $entry, $var, $val); $in = $ENV{'QUERY_STRING'}; @in = split(/\&/, $in); foreach $entry (@in) { $entry =~ s/\+/ /g; ($var, $val) = split(/=/, $entry, 2); $var =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; $val =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; $form{$var} = $val; if ($var eq 'tld') { $tlds .= "$val:"; } } @tlds = split(/\:/,$tlds); } print qq~
UK domain names cost £9.99 per two years.
US domain names cost £24.99 per two years.

~; &foot;